dynamic arrays

mcqspedia.com has 5 Question/Answers about Topic dynamic arrays

Float * p = new float [50]; is an example of

Float * p = new float [50]; is an example of
  • A. Static array declaration
  • B. Dynamic array declaration
  • C. Multi-dimensional array declaration
  • D. Both A and B
  • Correct Answer: Option B

What is used for accessing contents of memory location whose address is stored in a pointer variable?

What is used for accessing contents of memory location whose address is stored in a pointer variable?
  • A. By applying address operator &
  • B. By applying dereference operator *
  • C. By applying some special function
  • D. None of them
  • Correct Answer: Option B

A pointer that is not initialized, is called

A pointer that is not initialized, is called
  • A. Deference pointer
  • B. Null pointer
  • C. Dangling pointer
  • D. Empty pointer
  • Correct Answer: Option C

How a static array is declared?

How a static array is declared?
  • A. float a [10];
  • B. float * p = new float [60];
  • C. int % p = float [30];
  • D. None of them
  • Correct Answer: Option A

Which from following is not a mutable lvalue?

Which from following is not a mutable lvalue?
  • A. double x= 1.54;
  • B. a [6]
  • C. double & r = x;
  • D. double a [7] = {0.0};
  • Correct Answer: Option D