Pointers Questions and Answers

Practice Mode
Showing 10 of 217 questions
Q141
What happens when huge pointer 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 C
Q142
Which of the following sttement is false ? I. If real addresses are same for both far pointers, when pointers are same. II. If real addresses are same for both huge pointers, then ponters are ame. III. There are many far  addresses for a single real address. IV. There are many real addresses for a single far address
  • A I & III
  • B II &IV
  • C II &III
  • D I &IV
Answer: Option D
Q143
Find the output vaoid main ( ) { int *p, **q, i=5; p=&i; q=p; **q=10; printf ("%d %d", *p, **q); }
  • A 5 10
  • B 10 10
  • C 5 5
  • D 5 10Null pointer assignment
Answer: Option D
Q144
Find the output void main ( ) { int x=5, *p, sum=0; p=&x; *p=10; p=∑ *p=x; printf ("%d %d %d", x, *p,sum); }
  • A 5 10 0
  • B 5 10 5
  • C 10 10 10
  • D 5 10 10
Answer: Option C
Q145
Which of the following statement is false
  • A huge pointers are the default pointers in huge memoy model
  • B ar pointers can work beyond 64kb segment offseg
  • C huge pointers can never be the default pointers
  • D static local pointers are initialized to 0 automatically
Answer: Option A
Q146
Find the output void main ( ) { int *p, i=10; void *q; p=&i; q=p; printf ("%d", *q++); }
  • A 10
  • B 11
  • C compilation error
  • D None of these
Answer: Option C
Q147
State the true statement
  • A Generic pointers can't be derererenced.
  • B Generic pointers can be dereferenced using explicit type conversion.
  • C Generic variables can't be declared.
  • D All the above
Answer: Option D
Q148
Int far **p, here p is a
  • A Far pointer holds address of another far pointer.
  • B Near pointer holds address of another far pointer.
  • C Far pointer holds address of another near pointer.
  • D Near pointer holds address of another near pointer.
Answer: Option B
Q149
Find the output void main ( ) { int a [ ] ={1, 2, 3, 4, 5}; int i ; for (i=0; i<5; i++) { printf ("%d", *a); a++; } }
  • A 1 2 3 4 5
  • B 1 0 0 0 0
  • C Error: Lvalue required
  • D None of these
Answer: Option C
Q150
Null pointer assignment error occurs only in
  • A Tiny & small memory model
  • B Small & compact memory model
  • C Compact & large memory model
  • D Small & medium memory model
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test