C Assignment min.
Time duration 30
1 What is the difference between following code and Why is it used in the program? # include < prg1.c> # include “prg1.c” 2 What will be the out put of the following code? int r=0 , x=1, y=2 , z=3; If(x,y,z,r) printf( “Best of luck” ); else printf(“Welcome to CDAC”); 3 What will be the out put of the following code? int g=1, i=2,r=3,c; c = g++ || ++i && -- r ; printf( “%d,%d,%d,%d”, g,i,r,c ); 4.What will be the output of the following code? int i =2 ; i= i++*++i; printf(“%d”, i); 5.Read the following code and give the output ? int i, j; i=2;j=3; printf(“%d,%d,%d,%d”, i<2,i==2,i>2,i = -2); printf(“%d,%d”, j++, j--); 6. #define X 2+3; printf(“%d,%d”,X*2 , 2/X); What will be the output? 7. What will the following code do ? int x ; x +=2; printf(“%d”,x); 8. int x=2; while(x<14)printf(“%d,%d”,x++,++x); What will the following code do? 9. What does the code do? int x=2,y=3; printf(“%d”,y-x||--y); printf(“%d,%d”,x++,++y); 10.int x; x=4;x+=2;x-=2; printf(“%d”,--x - 2&&++x); What is the result of following code?
BEST OF LUCK FOR CDAC