Multiple choice

void main(){int *x, y;y=10;x=&y; printf(Value of y=%d n, y); printf(Value of y=%d n, *x);} What is the output of the above C code?

  1. 10 00

  2. 10 20

  3. 10 10

  4. Compiler Error

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

This is the correct option as * is an indirection operator, which is used in conjunction with pointers. *x means the value of address stored by the variable x.