main()
{
int i=4,j=7;
j = j || i++ && printf("YOU CAN");
printf("%d %d", i, j);
}
Answer / susie
Answer :
4 1
Explanation:
The boolean expression needs to be evaluated only till the
truth value of the expression is not known. j is not equal
to zero itself means that the expression’s truth value is 1.
Because it is followed by || and true || (anything) => true
where (anything) will not be evaluated. So the remaining
expression is not evaluated and so the value of i remains
the same.
Similarly when && operator is involved in an expression,
when any of the operands become false, the whole
expression’s truth value becomes false and hence the
remaining expression will not be evaluated.
false && (anything) => false where (anything) will
not be evaluated.
Is This Answer Correct ? | 5 Yes | 0 No |
How can i find first 5 natural Numbers without using any loop in c language????????
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
Is this code legal? int *ptr; ptr = (int *) 0x400;
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,
Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };
How we print the table of 2 using for loop in c programing?
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h
main() { char c=' ',x,convert(z); getc(c); if((c>='a') && (c<='z')) x=convert(c); printf("%c",x); } convert(z) { return z-32; }
#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }
Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }