Adv C MCQ
Adv C MCQ
(7) How to refer an element in ith row jth column of a two dimensional array
b) x[i,j] b) x[i][j] c) x[ij] d) x[i]x[j]
a) % b) & c) ^ d) *
(9) If the size of integer is 4 bytes, what will be the output of the program?
int main()
{
int arr[]={12,13,14,15,16};
printf(“%d, %d, %d\n”,sizeof(arr),sizeof(*arr),sizeof(arr[0]));
return 0;
}
a) 10, 2, 4 b) 20, 4, 4 c) 16, 2, 2 d) 20, 2, 2
(10) int a[10] will reserve how many locations in the memory?
a) 10 b) 9 c) 11 d) None of the above
(13)Which of the following is the correct syntax to declare a 3 dimensional array using
pointers?
a) char *a[][];
b) char **a[];
c) char ***a;
d) all of the mentioned
18) Character constants are enclosed in Actual and formal parameters must agree in
a) Data types b) Number of arguments and Data types c)Names and Data type d)
None
a)‘ ‘ b) “ “ c) ( ) d) [ ]
(38) int k[3]={1,2,3};int *p; one of the following statement is equal to p=k is