This is a timed quiz.
You have 20 minutes to complete the 4 questions in this quiz.
Click the button below to start the quiz.
Which of the following statements are correct about an if-else statements in a C-program?
1: Every if-else statement can be replaced by an equivalent statements using ?: operators
2: Nested if-else statements are allowed.
3: Multiple statements in an if block are allowed.
4: Multiple statements in an else block are allowed.
1 and 2
2 and 3
1, 2 and 4
2, 3, 4
Point out the error, if any in the for loop.
There should be a condition in the for loop
The two semicolons should be dropped
The for loop should be replaced with while loop.
8 What is x in the following program?
typedef char (*(*arrfptr)());
x is a pointer
x is an array of three pointer
x is an array of three function pointers
Error in x declaration
How will you free the memory allocated by the following program?
#define MAXROW 3
#define MAXCOL 4
int **p, i, j;
p = (int **) malloc(MAXROW * sizeof(int*));