Skip to content
Related Articles

Related Articles

C | Storage Classes and Type Qualifiers | Question 19
  • Difficulty Level : Medium
  • Last Updated : 06 Mar, 2013


#include <stdio.h>
int main()
  register int i = 10;
  int *ptr = &i;
  printf("%d", *ptr);
  return 0;

(A) Prints 10 on all compilers
(B) May generate compiler Error
(C) Prints 0 on all compilers
(D) May generate runtime Error

Answer: (B)

Explanation: See point 1 of Register Keyword

Quiz of this Question

Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.
My Personal Notes arrow_drop_up
Recommended Articles
Page :