main()
{
int i=-1;
-i;
printf("i = %d, -i = %d \n",i,-i);
}
Answer / susie
Answer :
i = -1, -i = 1
Explanation:
-i is executed and this execution doesn't affect the value
of i. In printf first you just print the value of i. After
that the value of the expression -i = -(-1) is printed.
Is This Answer Correct ? | 6 Yes | 1 No |
write a c-program to display the time using FOR loop
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
main() { int i=5; printf("%d",++i++); }
void main() { char ch; for(ch=0;ch<=127;ch++) printf(ā%c %d \nā, ch, ch); }
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); }
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
Write a program to print a square of size 5 by using the character S.
How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user
main() { show(); } void show() { printf("I'm the greatest"); }