Pointers Questions and Answers

Practice Mode
Showing 10 of 217 questions
Q21
How does compiler diferentiate indirection operator from multiplication operator ?
  • A by using the number of operands
  • B by seeing the position of operand
  • C both options a and b
  • D by using the value of the operand
Answer: Option C
Q22
The address of operator returns
  • A the address of its operand
  • B Ivalue
  • C both options a and b
  • D rvalue
Answer: Option A
Q23
The indirection operator returns
  • A The data object stored in the address represented by its operand
  • B Ivalue
  • C both options a and b
  • D rvalue
Answer: Option C
Q24
The operrand of indirection operator is
  • A Pointer variable
  • B pointer expression
  • C both options a and b
  • D ordinary variable
Answer: Option C
Q25
The operand of address of operator may be
  • A an ordinary variable
  • B an array variable
  • C a pointer variable
  • D Any one of the above
Answer: Option D
Q26
identify the invalid Ivalue given int x, *p = &x;
  • A *(P +1)
  • B *(p-3)
  • C both options a and b
  • D &x
Answer: Option D
Q27
After the execution of the statement int x; the value of x is
  • A 0
  • B undefined
  • C 1
  • D -1
Answer: Option B
Q28
Pointer variable may be initialized using
  • A static memory allocation
  • B dynamic memory allocation
  • C both options a and b
  • D a positive integer
Answer: Option C
Q29
identify the invalid pointer operator.
  • A &
  • B *
  • C >>
  • D none of the above
Answer: Option C
Q30
Assume 2 bytes for int, 4 bytes for float and 8 butes for double data types respectively, how may bytes are assigned to the following pointer variables ? int *ip; float *fp; double *dp;
  • A 2 bytes for ip, 4 bytes for fp and 8 butes for dp
  • B 2 bytes for all pointer variables ip, fp and dp
  • C one byte for ip, 2 bytes for fp nd 4 bytes for dp
  • D 2 bytes for ip and 8 bytes for each fp and dp
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test