Pointers Questions and Answers

Practice Mode
Showing 10 of 217 questions
Q11
A pointerr value refers to
  • A an integer constant
  • B a float value
  • C any valid address in memory
  • D any ordinary variable
Answer: Option C
Q12
Identify the correct declaration of pointer variables p1, p2.
  • A int p1, p2;
  • B int *p1, p2;
  • C int p1, *p2;
  • D int *p1, *p2;
Answer: Option D
Q13
the operators exclusively used in connection with pointers are
  • A *and /
  • B & and *
  • C & and |
  • D - and >
Answer: Option B
Q14
Identify the invalid expression for given register int r = 10;
  • A r = 20
  • B &r
  • C r + 15
  • D r/10
Answer: Option B
Q15
Identify the invalid expression.
  • A & 274
  • B & (a + b)
  • C & (a*b)
  • D all the above
Answer: Option D
Q16
Identify the wrong declaration statement.
  • A int *p, a=10
  • B int a=10, *p = &a;
  • C int *p = &a, a=10;
  • D options a and b
Answer: Option C
Q17
Identify the invalid expression given int num = 15, *p = #
  • A *num
  • B * (&num)
  • C *&*num
  • D **&p
Answer: Option A
Q18
Identify the invalid expression for given float x = 2.14, * y = &x;
  • A &y
  • B *&x
  • C **&y
  • D (*&)x
Answer: Option D
Q19
the operand of the address of operator is
  • A a constant
  • B an expression
  • C a named region of storage
  • D a register variable
Answer: Option C
Q20
How does compiler differentiate address of operator from bitwise AND operator ?
  • A by using the number of operands and position of operands
  • B by seeing the declarations
  • C both options a and b
  • D by using the value of the operand
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test