main()
{
int i=-1,j=-1,k=0,l=2,m;
m=i++&&j++&&k++||l++;
printf("%d %d %d %d %d",i,j,k,l,m);
}
Answer / susie
Answer :
0 0 1 3 1
Explanation :
Logical operations always give a result of 1 or
0 . And also the logical AND (&&) operator has higher
priority over the logical OR (||) operator. So the
expression ‘i++ && j++ && k++’ is executed first. The
result of this expression is 0 (-1 && -1 && 0 = 0). Now
the expression is 0 || 2 which evaluates to 1 (because OR
operator always gives 1 except for ‘0 || 0’ combination- for
which it gives 0). So the value of m is 1. The values of
other variables are also incremented by 1.
Is This Answer Correct ? | 39 Yes | 11 No |
#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }
How do you write a program which produces its own source code as its output?
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...............
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
9 Answers CSC, GoDB Tech, IBM,
Write a program to check whether the number is prime and also check if it there i n fibonacci series, then return true otherwise return false
How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }
main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }
Write a program to receive an integer and find its octal equivalent?
Is the following code legal? struct a { int x; struct a *b; }