Q. What is the type of variables “b” and “d” in the following code?
Code:
int a[], b; int []c, d;
β
Correct Answer: (C)
‘b’ is a variable of type int; ‘d’ is an array of type int
Explanation: If square brackets [] is declared after the variable, it only applies to a single variable. If square brackets [] is declared before the variable, it applies to all variables.