Multiple choice

What will be the output of the following set of codes after execution?

void main() { printf(“%d”,sizeof(' ')); }

  1. 2

  2. 1

  3. 0

  4. Garbage value

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

It will print 1 because ' ' is a tab character. ' ' is the escape sequence and C language considers all escape sequence as a single character.