How we will connect multiple client ? (without using
fork,thread)
Answers were Sorted based on User's Feedback
Answer / amaresh_83
hi
plz send me (avirus_944@yahoo.co.in)
Thanks
Amaresh...
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / jay
Using select() in socket, we can connect multiple clients.
Please go through the uses of select().
| Is This Answer Correct ? | 1 Yes | 1 No |
{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
In the following pgm add a stmt in the function fun such that the address of 'a' gets stored in 'j'. main(){ int * j; void fun(int **); fun(&j); } void fun(int **k) { int a =0; /* add a stmt here*/ }
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
main() { int (*functable[2])(char *format, ...) ={printf, scanf}; int i = 100; (*functable[0])("%d", i); (*functable[1])("%d", i); (*functable[1])("%d", i); (*functable[0])("%d", &i); } a. 100, Runtime error. b. 100, Random number, Random number, Random number. c. Compile error d. 100, Random number
Is the following code legal? typedef struct a { int x; aType *b; }aType
how to concatenate the two strings
#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
main() { extern out; printf("%d", out); } int out=100;
How to read a directory in a C program?