Array in C Language

Programming Language > C Programming Language

Test your knowledge of arrays in C programming with these multiple choice questions. Learn about the different types of arrays in C and how to use them to store and manipulate data. Take the quiz now! ➲ Array in C Language - Quiz


  • A int num[6] = { 2, 4, 12, 5, 45, 5 };
  • B int n{} = { 2, 4, 12, 5, 45, 5 };
  • C int n{6} = { 2, 4, 12 };
  • D int n(6) = { 2, 4, 12, 5, 45, 5 };
  • A Sequential
  • B Random
  • C Sequential and Random
  • D None of the above
  • A I and II
  • B I, II and III
  • C II and III
  • D I, III and IV
  • A 2
  • B 10
  • C 20
  • D Theoratically no limit. The only practical limits are memory size and compilers.
  • A Initialization is a part of definition
  • B It is a declaratrion
  • C It is a formal parameter
  • D All of these
  • A 0 0
  • B Garbage value 0
  • C 0 Garbage Value
  • D Garbage vlaue Garbage Value
  • A ptr is array of pointers to 10 integers
  • B ptr is a pointer to an array of 10 integers
  • C ptr is an array of 10 integers
  • D ptr is an pointer to array
  • A Address of the array.
  • B Values of the first elements of the array.
  • C Address of the first element of the array.
  • D Number of element of the array.
  • A void fun(int p[][4]){}
  • B void fun(int *p[4]){}
  • C void fun(int *p[][4]){}
  • D void fun(int *p[3][4]){}
  • A The code is erroneous since the statement declaring array is invalid.
  • B The code is erroneous since the subscript for array used in for loop is in the range 1 to size.
  • C The code is correct and runs successfully.
  • D The code is erroneous since the values of array are getting scanned through the loop.