Q. If an integer array pointer is incremented, how many bytes will be skipped to reach next element location?

  • (A) 1
  • (B) 2
  • (C) 8
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) 2

Q. What is the function used to allocate memory to an array at run time with Zero initial value to each?

  • (A) calloc()
  • (B) malloc()
  • (C) palloc()
  • (D) kalloc()
πŸ’¬ Discuss
βœ… Correct Answer: (A) calloc()

Q. What is the function used to allocate memory to an array at run time without initializing array elements?

  • (A) calloc()
  • (B) malloc()
  • (C) palloc()
  • (D) kalloc()
πŸ’¬ Discuss
βœ… Correct Answer: (B) malloc()

Q. What is the dimension of the C array int ary[10][5].?

  • (A) 1
  • (B) 2
  • (C) 5
  • (D) 10
πŸ’¬ Discuss
βœ… Correct Answer: (B) 2

Q. Choose a correct statement with array pointers.

  • (A) It is valid to add an integer number to an array pointer. Result can be anything.
  • (B) It is valid to subtract an integer number from array pointer. Result can be anything.
  • (C) Difference of pointers to two elements of an array gives the difference between their indexes.
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. Choose correct statement about C array pointers.

  • (A) You can compare two array elements with *p == *(p+i)
  • (B) You can compare two pointers with p1==p2.
  • (C) Accessing out of bounds index element is valid and it returns a garbage value.
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. Difference between C Arrays, ary[10] and cry[10][10] is.

  • (A) ary[10] is a single dimensional array. cry[10][10] is a Multidimensional array.
  • (B) ary[10] is a multidimensional array. cry[10][10] is a single dimensional array.
  • (C) Size of ary[10] is sizeof(10* int). Size of cry[10][10] is sizeof(10*int).
  • (D) None of the above.
πŸ’¬ Discuss
βœ… Correct Answer: (A) ary[10] is a single dimensional array. cry[10][10] is a Multidimensional array.

Q. Array of Arrays is also called.?

  • (A) Multi Data Array
  • (B) Multi Size Array
  • (C) Multi Dimensional Array
  • (D) Multi Byte Array
πŸ’¬ Discuss
βœ… Correct Answer: (C) Multi Dimensional Array

Q. Choose a correct statement about a C Multidimensional array.

  • (A) First Dimension size is optional when initializing the array at the same time.
  • (B) Last Dimension size is optional when initializing the array at the same time.
  • (C) It is a must to specify all dimensions of a multidimensional array.
  • (D) Memory locations of elements of a multidimensional array is not sequential.
πŸ’¬ Discuss
βœ… Correct Answer: (A) First Dimension size is optional when initializing the array at the same time.

Q. A multidimensional array of dimension N is a collection of

  • (A) Single Dimensional Arrays
  • (B) N dimensional arrays
  • (C) N-1 dimension arrays
  • (D) N-2 dimension arrays
πŸ’¬ Discuss
βœ… Correct Answer: (C) N-1 dimension arrays