devices were not unregisterd but today its done
whenever i execute server every time i need to change the port no. if i don’t change its sayin “bind: address in use”..?????
sir i have implemented single client server model using socket….heading towards multiple client
sir i have implement client server model using message queue
suppose we define a binary semaphore why its starting value is 1???????
#include<stdio.h> int sarr[7]; int i,j=200;top=-1; int push(); int pop(); int display(); int ch; int main() { while(j>1) { printf(“enter case\n”); scanf(“%d”,&ch); switch(ch) { case 0:push(); break; case 1:pop(); break; case 3:j=-1; break; default: printf(“wrong selection”); } } } int push() … Continue reading
#include<stdio.h> #include<sys/types.h> #include<unistd.h> #include<stdlib.h> int main() { pid_t child_pid; child_pid = fork (); if (child_pid > 0) { }else { exit(0); }
#include #define MONTHS 12 int main() { int days[MONTHS]={31,28,[4]=31,30,31,[1]=29}; int i; for(i=0;i<MONTHS;i++) printf("%2d %d\n",i+1,days[i]); return 0; }
#include<stdio.h> int main() { int x=1,y=1,z; if(y<0) if(y>0) x=3; else x=5; printf(“%d\n”,x); printf(“%d\n”,y); return 0;
i=l=f=d=100/3; printf(“%.8g\t”,(double)i); printf(“%.8g\t”,(double)f); printf(“%.8g\t”,(double)d); d=f=l=i=100/3; printf(“%.8g\t”,(double)i); printf(“%.8g\t”,(double)f); printf(“%.8g\t”,(double)d);
#include<stdio.h> int main() { int x,y,z; x=y=z=1; ++x||++y&&++z; printf(“%d\t%d\t%d\n”,x,y,z); return 0; }
#include<stdio.h> int main() { int x=2,y,z; x*=3+2; printf(“%d\n”,x); x*=y=z=4; printf(“%d\n”,x); x=y==z; printf(“%d\n”,x); return 0; }