Posts

Showing posts from December 13, 2012
Hiiiii to all........pls frnds....before download the content from this blog...plss join this site and like my facebook page also ......  http://www.facebook.com/Prasenrajblog.......thanks to all......

Difference between TCP and UDP

TCP UDP Reliability : TCP is connection-oriented protocol. When a file or message send it will get delivered unless connections fails. If connection lost, the server will request the lost part. There is no corruption while transferring a message. Reliability : UDP is connectionless protocol. When you a send a data or message, you don't know if it'll get there, it could get lost on the way. There may be corruption while transferring a message. Ordered : If you send two messages along a connection, one after the other, you know the first message will get there first. You don't have to worry about data arriving in the wrong order. Ordered : If you send two messages out, you don't know what order they'll arrive in i.e. no ordered Heavyweight : - when the low level parts of the TCP "stream" arrive in the wrong order, resend requests have to be sent, and all the out of sequen...

To display list of C program files and directories.

#include #include #include void main() {             clrscr();             printf("********** List of C Program files **********\n");             system("dir *.c /w");             printf("\n********** List of C Program directories **********\n");             system("dir /ad"); }

To convert hexadecimal to decimal numbers.

#include #include #include #include void main() {             char hex[' '], c;             int i,len,dec[' '],total;             clrscr();             do             {

To print whether the number entered is even or odd, using conditional operator

#include #include void main() {             int num;             char c;             clrscr();             do             {                         printf("Enter any number:\t");                         scanf("%d",&num);                         num%2==0 ? printf("\nNumber is even\n") : printf("\nNumber is odd\n");       ...

Write a menu driven program to create a linked list and to perform insert and delete operations

#include #include #include #include #include int insbeg(int item); int inspos(int item); int insend(int item); int delbeg(); int delpos(); int delend(); struct node {             int info;             struct node *link; }; typedef struct node n1; n1 *start = NULL; n1 *currptr, *newnode, *preptr; class list {             public:                         int create();                         int display();                         i...

Write a menu driven program to sort the array in ascending/descending order using a) Quick sort b) Merge sort

#include #include #include #include class sort {             int a[30], i, j, k, n;             public:                         int mergesort(int a[], int low, int high);                         int simplemerge(int a[], int low, int mid, int high);                         int partition(int a[], int low, int high);                         int quicksort(int a[], int low, int high); }; int sort::me...