Which of the following declarations are illegal?

Which of the following declaration are illegal? mcqs and its answers is provided on this page.

Which of the following declaration are illegal?

Que. Which of the following declaration are illegal?
a. int a[][] = {{1, 2, 3}, {2, 3, 4, 5}};
b. int *a[] = {{1, 2, 3}, {2, 3, 4, 5}};
c. int a[4][4] = {{1, 2, 3}, {2, 3, 4, 5}};
d. none of the mentioned
Answer: a
Explanation : None.


Que. Which of the following declaration is illegal?
a. int a = 0, b = 1, c = 2;
int array[3] = {a, b, c};
b. int size = 3;
int array[size];
c. int size = 3;
int array[size] = {1, 2, 3};
d. All of the mentioned
Answer: c
Explanation : None.


Que. Which of the following function declaration is illegal?
a. int 1bhk(int);
b. int 1bhk(int a);
c. int 2bhk(int*, int []);
d. all of the mentioned
Answer: d
Explanation : None.


Comments