main(){
int a= 0;int b = 20;char x =1;char y =10;
if(a,b,x,y)
printf("hello");
}
Answer / susie
Answer :
hello
Explanation:
The comma operator has associativity from left to right.
Only the rightmost value is returned and the other values
are evaluated and ignored. Thus the value of last variable y
is returned to check in if. Since it is a non zero value if
becomes true so, "hello" will be printed.
Is This Answer Correct ? | 22 Yes | 1 No |
struct point { int x; int y; }; struct point origin,*pp; main() { pp=&origin; printf("origin is(%d%d)\n",(*pp).x,(*pp).y); printf("origin is (%d%d)\n",pp->x,pp->y); }
write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30
what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }
Write a function to find the depth of a binary tree.
13 Answers Adobe, Amazon, EFI, Imagination Technologies,
Display the time of the system and display the right time of the other country
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }
main( ) { static int a[ ] = {0,1,2,3,4}; int *p[ ] = {a,a+1,a+2,a+3,a+4}; int **ptr = p; ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *++ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); ++*ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); }
write a c-program to find gcd using recursive functions
plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }