Posts

Sybcs sem4 questions paper 2022

Image
Sybsc computer science  : Sem 4 : Questions papers :   1.data structure and algorithms: 2.computer network I : 3.computational geometry : 4.operational research : 5.Embedded system : 6.Wireless communication and internet of things : 7.English : 8.Environmental Awarness(EVS) S

INDEGREE OUTDEGREE & TOTAL DEGREE OF VERTEX IN GRAPH

           INDEGREE       OUTDEGREE       TOTAL DEGREE     OF VERTEX IN GRAPH //graph //indegree outdegree and total degree #include < stdio.h >     int main ()   {     int a [ 10 ][ 10 ], i , j , in , out , total , n ;     printf ( " plz enter the no of vertices: " );     scanf ( " %d " , & n );       for ( i = 0 ; i < n ; i ++ )       {         for ( j = 0 ; j < n ; j ++ )           {             a [ i ][ j ] = 0 ;             if ( i != j )               {                   printf ( " is edge between %d and %d : " , i + 1 , j + 1 );                   scanf ( " %d " , & a [ i ][ j ])...

DIJKSTRA SHORTEST PATH ALGORITHM:

  links:                                          Hobbies:                                             Sketches The Girl...                                         Small Unwonderful Story  Programming Languages:                                   C++                                JAVA                                HTML       Something:         ...

GRAPH TRAVERSAL : BFS & DFS

  GRAPH TRAVERSL:     1]  BFS    2] DFS BFS: //bfs #include < stdio.h >   #define maxsize 20   typedef struct node   {       int data [ maxsize ];       int front , end ;   } queue ;   int initq ( queue * pq )     {       pq -> front = pq -> end =- 1 ;     }   int isempty ( queue * pq )     {       return ( pq -> end == pq -> front );     }   void enqueue ( queue * pq , int n )     {         pq -> data [ ++ pq -> end ] = n ;     }   int dequeue ( queue * pq )     {         return pq -> data [ ++ pq -> front ];     }   int bfs ( int a [ 4 ][ 4 ], int n )     {       int w , v ;       int visited [ 25 ] = { 0 };       queue q ; ...

Raspberry pi & Arduino programs

  Raspberry pi programs: # led interfacing raspberry pi # to study and understand led interfacing raspberry pi from RPi . GPIO import * import time setwarnings ( False ) setmode ( BCM ) setup ( 4 , OUT ) while True :     output ( 4 , HIGH )     time . sleep ( 2 )     output ( 4 , LOW )     time . sleep ( 3 )     # switch interfacing raspberry pi # to study and understand interfacing switch connect to the raspberry pi from RPi . GPIO import * import time setwarnings ( False ) setmode ( BCM ) setup ( 4 , OUT ) setup ( 17 , IN ) while True :     button_state = input ( 17 )     if button_state == False :         output ( 4 , False )         print ( " Button pressed... " )         while input ( 17 ) == False :             time . sleep ( 2 )     else :         output ( 4 , True ) #te...