Pointers Questions and Answers

Practice Mode
Showing 10 of 217 questions
Q131
Find the output void main ( ) { int i=4, j=-3; mul (&i, j); printf ("%d %d", i, j); } mu1 (int *a, int b) { *a=*a **a; b=b*b; }
  • A 4 3
  • B 4 9
  • C 16 -3
  • D None of these
Answer: Option C
Q132
Find the out #include "studio.h" void main ( ) { printf ("%d %d"), sizeof (NULL), sizeof (" ")); }
  • A 0 0
  • B 1 1
  • C 2 1
  • D 1 2
Answer: Option C
Q133
Where can pointers be used I. Dynamic memory allocation' II. Call by reference III. Implementing trees IV. Accessing string elements
  • A only I & II
  • B only III &IV
  • C I, II &IV
  • D All of these
Answer: Option D
Q134
What is the size of pointer if memory model is compact in Turbo C?
  • A 1 byte
  • B 2 byte
  • C 4 byte
  • D None of these
Answer: Option C
Q135
Find the output void main ( ) { int a=5, *p=&a; a=XXX (&p); printf ("%d %d", a, *p); } XXX (int **p) { int b= **p***p; }
  • A 25 25
  • B 5 65524
  • C Garbage value
  • D Compilation eror
Answer: Option A
Q136
The poitner which is created in data segment and holds the address within data segment is  known as:
  • A Near pointer
  • B Bad pointer
  • C Smart pointer
  • D None of these
Answer: Option A
Q137
What is the difference between ++*p and *p++?
  • A In both cases pointers are incremented.
  • B In both cases values are incremented.
  • C In first case value is incremented and in second case pointer is incremented.
  • D In first case pointers is incremented and in second case value is incremented.
Answer: Option C
Q138
EP_SEG( ), FP_OFF ( ) are declared in which header file ?
  • A sys.h
  • B dos.h
  • C stdio.h
  • D offset.h
Answer: Option B
Q139
What is the formula to find real address ?
  • A segment address *16+offset address
  • B Segment address+offset address *16
  • C Segment address*10+offset address
  • D Segment address+ofset address*10
Answer: Option A
Q140
What happens when far address is incremented ?
  • A Only segment address is incremented.
  • B Only offset address is incremented.
  • C Both segment and offset address are incremented.
  • D None of these
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test