Pointers Questions and Answers

Take Exam

Pointers questions with answers are a crucial part of C programming preparation, often included in technical interviews and MCQ-based exams. Pointers are variables that store the memory address of other variables, making them fundamental to dynamic memory management and efficient program design. These C programming MCQ questions and answers help students understand pointer arithmetic, function pointers, arrays, and memory allocation. Commonly asked in placement exams by TCS, Infosys, and Wipro, mastering pointer concepts gives you a competitive edge in coding tests and programming interviews.

Pointers

Showing 10 of 217 questions

141. What happens when huge pointer is incremented ?

  • Only segment address is incremented.
  • Only offset address is incremented.
  • Both segment and offset address are incremented.
  • None of these
Show Answer Report

142. 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

  • I & III
  • II &IV
  • II &III
  • I &IV
Show Answer Report

143. Find the output vaoid main ( ) { int *p, **q, i=5; p=&i; q=p; **q=10; printf ("%d %d", *p, **q); }

  • 5 10
  • 10 10
  • 5 5
  • 5 10Null pointer assignment
Show Answer Report

144. 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); }

  • 5 10 0
  • 5 10 5
  • 10 10 10
  • 5 10 10
Show Answer Report

145. Which of the following statement is false

  • huge pointers are the default pointers in huge memoy model
  • ar pointers can work beyond 64kb segment offseg
  • huge pointers can never be the default pointers
  • static local pointers are initialized to 0 automatically
Show Answer Report

146. Find the output void main ( ) { int *p, i=10; void *q; p=&i; q=p; printf ("%d", *q++); }

  • 10
  • 11
  • compilation error
  • None of these
Show Answer Report

147. State the true statement

  • Generic pointers can't be derererenced.
  • Generic pointers can be dereferenced using explicit type conversion.
  • Generic variables can't be declared.
  • All the above
Show Answer Report

148. Int far **p, here p is a

  • Far pointer holds address of another far pointer.
  • Near pointer holds address of another far pointer.
  • Far pointer holds address of another near pointer.
  • Near pointer holds address of another near pointer.
Show Answer Report

149. Find the output void main ( ) { int a [ ] ={1, 2, 3, 4, 5}; int i ; for (i=0; i<5; i++) { printf ("%d", *a); a++; } }

  • 1 2 3 4 5
  • 1 0 0 0 0
  • Error: Lvalue required
  • None of these
Show Answer Report

150. Null pointer assignment error occurs only in

  • Tiny & small memory model
  • Small & compact memory model
  • Compact & large memory model
  • Small & medium memory model
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test