C Arrays Questions and Answers

Take Exam

C Arrays questions with answers are among the most frequently asked topics in C programming questions and answers for technical interviews. Arrays form the backbone of data storage and manipulation in C language. By mastering array declaration, initialization, and traversal, you build a strong base for coding efficiency. Companies like TCS, Wipro, and Cognizant often test candidates with C array MCQs to assess logical implementation and memory handling. This section includes solved examples, explanations, and C array programs to help students achieve accuracy and confidence in placement tests.

C Arrays

Showing 10 of 50 questions

21. to initialize a 5 element array all having value 1 is given by

  • int num [5] = {1};
  • int num [4] = {1, 1, 1, 1, 1};
  • int num [5] = {1, 1, 1, 1, 1};
  • int num [ ] = {1};
Show Answer Report

22. To initialize a 5 element array all having value 0 is given by

  • int num [5] = {0};
  • int num [5] = {1, 1, 1, 1, 1};
  • options a and b
  • int num [ ] = ( 1 )
Show Answer Report

23. The declaration float f[ ] [ 3] = {{1, 0}, {2.0}, {3, 0}} represents

  • a one - by-three array
  • a three by-one-array
  • a three - by-three array
  • a one-by-one-array
Show Answer Report

24. A char array with the string value "aeiou" can be initialized as

  • char s [ ] = {'a', 'e' 'i', 'o', 'u'};
  • char s [ ] = "aeiou ";
  • char s [ ] = {'a', 'e', 'i', 'o','u', '\0'};
  • options b and c
Show Answer Report

25. If the size of an array is less than the number of initializers,

  • the extra values are neglected
  • it is an error
  • the size is automatically increased
  • the size is neglected
Show Answer Report

26. Identify the correct statement.

  • Float array can be read as a whole.
  • intger array can be read as a whole
  • Char array can be read as a whole.
  • Double array can be read as a whole.
Show Answer Report

27. Identify the correct statement.

  • Float array can be displayed by using single printf () without using a loop.
  • integer array can be displayed by using single printf () without using a loop.
  • Char array can be displayed by using single printf () without using a loop.
  • Double array can be displayed by using single printf () without using a loop.
Show Answer Report

28. Missing elements of partly initialized arrays, are

  • set to zero
  • set to one
  • not defined
  • invalid
Show Answer Report

29. The declaration of array main () { int a [10]; - - - }

  • reserves the space required for 11 elements
  • reserves space for 9 elements
  • does not initialize any element
  • initializes the values of all elements to 0
Show Answer Report

30. The value within the [ ] in an array declaration specifies

  • subscript value
  • index value
  • size of an array
  • value of the array element
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test