Skip to main content

Posts

Showing posts from April, 2009

computer networking concept

Networking concepts 1. What are the two types of transmission technology available? (i) Broadcast and (ii) point-to-point 2. What is subnet? A generic term for section of a large networks usually separated by a bridge or router. 3. Difference between the communication and transmission. Transmission is a physical movement of information and concern issues like bit polarity, synchronisation, clock etc. Communication means the meaning full exchange of information between two communication media. 4. What are the possible ways of data exchange? (i) Simplex (ii) Half-duplex (iii) Full-duplex. 5. What is SAP? Series of interface points that allow other computers to communicate with the other layers of network protocol stack. 6. What do you meant by "triple X" in Networks? The function of PAD (Packet Assembler Disassembler) is described in a document known as X.3. The standard protocol has been defined between the terminal and the PAD, called X.28; another standard protocol e...

FACTORIAL C CODE

\\TOPIC:FACTORIAL OF A NUMBER #include #include void main() { long int fact=1; int num,i=1; clrscr(); printf("Enter number for factorial"); scanf("%d",&num); for(i=1;i { fact=fact*i; } printf("Factorial is %ld",fact); getch(); }

LINKED LIST C CODE

\\DATA STRUCTURE \\TOPIC:MENUDRIVEN LINKED LIST IMPLEMENTATION \\AUTHOR:DARSHIT VORA #include #include #include struct node { int info; struct node *next; }*start,*temp,*nnew; int i=0,num; void insertbeg(); void insertmid(); void insertend(); void deletebeg(); void deletemid(); void delend(); void delall(); void display(); void main() { int ch,ch1,ch2; char ans; do { clrscr(); printf("What do you want to do?"); printf("\n\n1.Insert"); printf("\n2.Delete"); printf("\n3.Display"); printf("\n4.Exit"); printf("\n\nEnter your choice"); scanf("%d",&ch); switch(ch) { case 1: { printf("\n\n1.Insert at beginning"); printf("\n2.Insert in middle"); printf("\n3.Insert at end"); printf("\nEnter your choice"); scanf("%d",&ch1); switch(ch1) { case 1:insertbeg();break; case 2:insertmid();break; ...

STACK C CODE

\\DATA STRUCTURE \\TOPIC:MENUDRIVEN STACK IMPLEMENTATION \\AUTHOR:DARSHIT VORA #include #include #include void push(); void pop(); void display(); int stack[10],top=-1,ch,i,ele; char ans; void main() { clrscr(); do { printf("1 - insert"); printf("\n2 - delete"); printf("\n3 - display"); printf("\n4 - exit"); printf("\nWhat do u wanna do"); scanf("%d",&ch); switch(ch) { case 1: { push(); break; } case 2: { pop(); break; } case 3: { display(); break; } case 4:exit(0); } flushall(); printf("\nDo u wanna continue(y\n)"); flushall(); scanf("%d",&ans); }while(ans=='y'||'Y'); getch(); } void push() { if(top==-1) printf("\n stack is empty"); if(top>=10) { printf("\nstack is full"); } else { printf("\nEnter the elemnet u wanna insert"); scanf("%d",&ele); top=top+1; stack[top]=ele; ...

QUEUE(FIFO) C CODE

//DATA STRUCTURE //TOPIC:MENUDRIVEN QUEUE IMPLEMENTATION //AUTHOR:DARSHIT VORA #include #include #include void insert(); void qdelete(); void display(); int f=-1,r=-1,i,ch,ele; char ans; int q[10]; void main() { clrscr(); do { clrscr(); printf("1 - insert"); printf("\n2 - delete"); printf("\n3 - display"); printf("\n4 - exit"); printf("\nWhat do u wanna do"); scanf("%d",&ch); switch(ch) { case 1: { insert(); break; } case 2: { qdelete(); break; } case 3: { display(); break; } case 4:exit(0); } flushall(); printf("\nDo u wanna continue(y\n)"); flushall(); scanf("%d",&ans); }while(ans=='y'||'Y'); getch(); } void insert() { if(r==10) { printf("Queue is full"); } if(r==-1 && f==-1) { printf("Queue is empty"); f=f+1; r=r+1; printf("Enter the element"); scanf("%d",&q[r]); } else { ...

MULTIDIMENSIONAL MATRIX C CODE

\\DATA STRUCTURE \\TOPIC:MULTIDIMENSIONAL MATRIX(INSERTION,DISPLAY DIAGONAL,SUM OF DIAGONAL) \\AUTHOR:DARSHIT VORA #include #include void main() { int a[3][3],i,j,sum=0; clrscr(); for(i=0;i { for(j=0;j { printf("Enter the element of matrix"); scanf("%d",&a[i][j]); } } printf("\nThe matrix is:"); for(i=0;i { for(j=0;j { printf("\na[%d][%d] = %d",i,j,a[i][j]); } } printf("\nThe diagonal of matrix is:"); for(i=0;i { printf("\na[%d][%d] = %d",i,i,a[i][i]); } printf("\nSum of diagonal of matrix"); for(i=0;i { sum=sum+a[i][i]; } printf("\nSum = %d",sum); getch(); }

DATA STRUCTURE(LINEAR SEARCH C CODE)

//DATA STRUCTURE //TOPIC:LINEAR SEARCH C CODE //AUTHOR:DARSHIT VORA #include #include void main() { int a[5]={23,1,3,4,56}; int sk,flag=0,pos,i; clrscr(); printf("Enter the element u want to search"); scanf("%d",&sk); for(i=0;i { if(a[i]==sk) { flag=1; pos=i; } } if(flag==1) { printf("\nelement %d found at pos %d",sk,pos); } else printf("\nElement not found"); getch(); }

ARRAY OPERATION(DATA STRUCTURE C PROGRAM)

//DATA STRUCTURE //TOPIC:ARRAY //AUTHOR:DARSHIT VORA //program to perfom insertion and deletion from array from specified position #include #include void main() { int a[20],i,ele,n,pos; clrscr(); printf("\n\n Enter the size of the array: "); scanf("%d",&n); printf("\n Enter %d elements: ",n-1); for (i=0;i scanf ("%d",&a[i]); printf("\n\n Array: "); for(i=0;i printf("%d ",a[i]); //INSERTION printf("\n\n Enter the element you want to insert: "); scanf("%d",&ele); printf("\n Enter the position of insertion: "); scanf("%d",&pos); for(i=n-1;i>=pos;i--) a[i]=a[i-1]; a[i]=ele; printf("\n\n Array: "); for(i=0;i printf("%d ",a[i]); //DELETION printf("\n Enter the position of the element you want to delete:...

INDIAN RAILWAYS

History of rail transport in India A plan for a rail system in India was first put forward in 1832, but no further steps were taken for more than a decade. In 1844, the Governor-General of India Lord Hardinge allowed private entrepreneurs to set up a rail system in India. The East India Company (and later the British Government) encouraged new railway companies backed by private investors under a scheme that would provide land and guarantee an annual return of up to five percent during the initial years of operation. The companies were to build and operate the lines under a 99 year lease, with the government having the option to buy them earlier. Extent of Great Indian Peninsular Railway network in 1870. The GIPR was one of the largest rail companies at that time. Map of the Madras and South Mahratta Railway lines Two new railway companies, Great Indian Peninsular Railway (GIPR) and East Indian Railway (EIR), were created in 1853-54 to construct and operate two ...