C Language Interview Questions Test 7

This Test will cover complete C with very important questions, starting off from basics to advanced level.
Q. The program fragment __________.
int a = 5, b = 2;
printf("%d", a++ + ++b);
Q. Choose the correct statement for the following program:
    int x = 2, y = 5;
	if(x < y) 
	    return(x = x+y); 
Q. The code puts(argv[0]); __________.
Q. A possible output of the following program fragment is __________?
static char wer[][5] = {"harmot", "merli", "axari"};
printf({"%d %d %d", wer, wer[0], &wer[0][0]);

Q. The following program results in __________?
    printf("%u", main);
Q. A set of names can be represented as a __________.
Q. For the declaration int a, *b=&a, **c=&b;, the following program fragment __________.
a = 4;
**c = 5;
Q. If the following statement is appended to the above program fragment then?
b = (int *)**c;
Q. Considering the below mentioned two declarations. Which of the assignments given in the options are syntactically correct?
void *voidPtr;
char *charPtr

Q. Consider the following program fragment. What will be the output?
int v = 3, *pv = &v;
printf("%d %d", v, *pv);
Q. If the two statements are appended to the previous program fragment then the output will be?
*pv = 0;
printf("%d %d", *pv, v);
Q. If x is an array of integer, then the value of &x[i] is same as that of __________?
Q. Let x be an array. Which of the following cannot be present in the left-hand side of an assignment statement?
Q. Let x be an array. Which of the following operations are illegal?
Pick the correct answer for the following declaration.
char x[] = "WHATIZIT";
char *y = "WHATIZIT";

Having second thoughts for any code related question?

Try executing the code in our Code Playground