C Array Questions and Answers

Practice Mode
Showing 10 of 108 questions
Q1
Array is of
  • A scalar type
  • B aggregate type
  • C union type
  • D enumerated type
Answer: Option B
Q2
Array name is a
  • A variable
  • B pointer to constant
  • C constant pointer
  • D constant
Answer: Option C
Q3
The only operatr that can act on the arrray as a whole is
  • A indirection operator
  • B sizeof operator
  • C { }
  • D [ ]
Answer: Option B
Q4
Which of the following is true about array?
  • A Array elements are stored in contiguous memory locations
  • B In c arrays are stored in row-major order
  • C An array can be declared as local as well as global
  • D All the above
Answer: Option D
Q5
Identify the true statement
  • A memory allocated by an array can be deallocated using free () function
  • B C also supports zero length array
  • C array can be used to hold dissimilar kinds of data
  • D working beyond array size is not risky
Answer: Option B
Q6
Fnd the output 'void main ( ) { char a[4]="rama"; char b[ ] ="shyama"; printf{"%d %d", sizeof (a), sizeof (b)); }
  • A 4 7
  • B 5 6
  • C 5 7
  • D 4 6
Answer: Option A
Q7
Find the output void main () { char a[ ] ="rama"; har b [ ]=a; printf("%d %s", sizeof (b), b); }
  • A 5 rama
  • B 4 rama
  • C 5 r
  • D Compilation error
Answer: Option D
Q8
Find the output void main() { int a[ ] ={'a'a, 'b', 'c'}; printf("%d", sizeof (a)); }
  • A 3
  • B 4
  • C Can't be initialized
  • D None of these
Answer: Option D
Q9
It is said that the arrray uses "zero-basee addressing"because
  • A Array size must be an integer greater than zero
  • B The array subscript must always start at zero.
  • C Array declaration reserves memory during compilation
  • D None of these
Answer: Option B
Q10
Which is the about array ?
  • A Array can be dynamic
  • B Using malloc, memory an be allocated for array during run time
  • C Unused memory can't be used at the time of requirement
  • D None of these
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test