Determine output:main(){ int i = 5; printf("%d%d%d%d%d", i++, i--, ++i, --i, i);} 54544 45545 54554 45445 TRUE ANSWER : ? YOUR ANSWER : ?
What will be printed if the following code is executed?void main(){ int x=0; for( ; ; ) { if( x++ == 4 ) break; continue; } printf("x=%d", x);} x=5 Error x=0 x=1 x=4 TRUE ANSWER : ? YOUR ANSWER : ?
Find the output of the following program.#include<stdio.h>void main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);} Compilation error 14 13 11 12 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output?main() { char *p; p = "Hello"; printf("%cn",*&*p); } Hello None of these. Some address will be printed H TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following is not a correct variable type? float int real double char TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following code fragment?void main(){ printf("%x",-1<<4);} fff0 fff2 fff1 fff3 fff4 TRUE ANSWER : ? YOUR ANSWER : ?
The output of the following program is:#define f(g,g2) g##g2void main(){ int var12=100; printf("%d", f(var,12));} Syntax error 100 g##g2 10012 Runtime error TRUE ANSWER : ? YOUR ANSWER : ?
What will be printed after compiling and running the following code?main() { char *p; printf("%d %d",sizeof(*p), sizeof(p));} 1 1 1 2 2 2 2 1 TRUE ANSWER : ? YOUR ANSWER : ?
Find the output of the following program.void main(){ int i=10; /* assume address of i is 0x1234ABCD */ int *ip=&i; int **ipp=&&i; printf("%x,%x,%x", &i, ip, *ipp); } Runtime error 0x1234ABCD, 0x1234ABCD, 0x1234ABCD Syntax error 0x1234ABCD, 0x1234ABCD, 10 0x1234ABCD, 10, 10 TRUE ANSWER : ? YOUR ANSWER : ?
Choose the correct output for the following program.#include<stdio.h>void main(){ int a=10, b=11, c=13, d; d = (a=c, b+=a, c=a+b+c); printf("%d %d %d %d", d, a, b, c);} 13, 13, 24, 13 13, 10, 24, 50 50, 13, 24, 13 50, 13, 11, 13 50, 13, 24, 50 TRUE ANSWER : ? YOUR ANSWER : ?