Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

C | Storage Classes and Type Qualifiers | Question 19

  • Difficulty Level : Medium
  • Last Updated : 28 Jun, 2021


#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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!