Multiple choice

What will be the output of following C code? void main() { int t,*pt; register int y,*py; pt=&t; py=&y; t=10; y=90; printf(%d %d,*pt,*py); }

  1. 10 90

  2. 90 10

  3. 10 10

  4. Compilation error

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

The register variable stores in Central Processing Unit (CPU). So, y does not have any memory location. Hence, py=&y is not a valid statement.