C-Pointers Question and Answer

C-Pointers Question and Answer
11. A pointerr value refers to
  • an integer constant
  • a float value
  • any valid address in memory
  • any ordinary variable
Show Answer
12. Identify the correct declaration of pointer variables p1, p2.
  • int p1, p2;
  • int *p1, p2;
  • int p1, *p2;
  • int *p1, *p2;
Show Answer
13. the operators exclusively used in connection with pointers are
  • *and /
  • & and *
  • & and |
  • - and >
Show Answer
14. Identify the invalid expression for given register int r = 10;
  • r = 20
  • &r
  • r + 15
  • r/10
Show Answer
15. Identify the invalid expression.
  • & 274
  • & (a + b)
  • & (a*b)
  • all the above
Show Answer
16. Identify the wrong declaration statement.
  • int *p, a=10
  • int a=10, *p = &a;
  • int *p = &a, a=10;
  • options a and b
Show Answer
17. Identify the invalid expression given
int num = 15, *p = #
  • *num
  • * (&num)
  • *&*num
  • **&p
Show Answer
18. Identify the invalid expression for given float x = 2.14, * y = &x;
  • &y
  • *&x
  • **&y
  • (*&)x
Show Answer
19. the operand of the address of operator is
  • a constant
  • an expression
  • a named region of storage
  • a register variable
Show Answer
20. How does compiler differentiate address of operator from bitwise AND operator ?
  • by using the number of operands and position of operands
  • by seeing the declarations
  • both options a and b
  • by using the value of the operand
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test