Loading, please wait...

C Programming Array's Multiple Choice Questions And Answers

Search here for MCQs

Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:

List of Programming Full Forms 

26. Predict the output of below code:

#include<stdio.h>

int main()
{
    int arr[1]={10};
    printf("%d\n", 0[arr]);
    return 0;
}
  • Output : 1
  • Output : 10
  • Output : 6
  • Output : 8

27. Predict the output of below code:

int main() 
{ 
    char a[2][3][3] = {'g','e','e','k','s','f','o', 
                           'r','g','e','e','k','s'}; 
    printf("%s ", **a); 
    getchar(); 
    return 0; 
} 
  • Geeks
  • Error
  • geeksforgeeks
  • No Output

28. If storage class is missing in the array definition, by default it will be taken to be

  • either automatic or external depending on the place of occurrence
  • static
  • automatic
  • external

29. The information about an array used in a program will be sorted in

  • Static table
  • Dope vector
  • Activate Record
  • Both A and C

30. Predict the output of below code:

#include <stdio.h>
    void f(int a[][])
    {
        a[0][1] = 3;
        int i = 0, j = 0;
        for (i = 0;i < 2; i++)
        for (j = 0;j < 3; j++)
        printf("%d", a[i][j]);
    }
    void main()
    {
        int a[2][3] = {0};
        f(a);
    }
  • 0 3 0 0 0
  • Junk junk junk
  • Compile time error
  • No output