Skip to content
Related Articles

Related Articles

C | Variable Declaration and Scope | Question 7

View Discussion
Improve Article
Save Article
  • Difficulty Level : Medium
  • Last Updated : 28 Jun, 2021
View Discussion
Improve Article
Save Article




int main()
{
  int x = 032;
  printf("%d", x);
  return 0;
}

(A) 32
(B) 0
(C) 26
(D) 50


Answer: (C)

Explanation: When a constant value starts with 0, it is considered as octal number. Therefore the value of x is 3*8 + 2 = 26

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!