Loading, please wait...

C Programming Array's Multiple Choice Questions And Answers

Search here for MCQs

Here you will get C Programming with Array Multiple Choice Questions And Answers for you next job or exam

C Programming Array's Multiple Choice Questions And Answers

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 

1. What is Array?

  • Collection of different type of elements
  • Collectionof similar type of elements
  • None of the above
  • Both A and C

2. What are the Types of Arrays?

  • int, float, char, double
  • struct, enum
  • long
  • All the above

3. Assume the output of below code:

"#include <stdio.h>
    void f(int a[2][])
    {
        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);
    }"
  • compile time error
  • All junk values
  • 0 Only
  • Runtime error

4. Let x be an array. Which of the following are illegal

  • x++
  • x+1
  • x*2
  • none of these

5. Predict the output of below code:

#include "stdio.h"
#include "stdlib.h"

int main(int argc, char *argv[]) { 
    char temp[20];
    gcvt(23.45,2, temp);
    printf("%s", temp);
    return 0;
}
  • Output : 0.4
  • Output : 24.4
  • Output : 25.4
  • Output : 23