aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java
  • void main(){int *x, y;y=10;x=&y; printf(Value of y=%d...
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.

Keep practicing — related questions

  • The output of the following code snippet is ___________ ( ) main( ) { int x=3,y,z; y=x=10; z=x<10; printf(n...
  • What would be the output of the following? main() { int y,x=5; y=++x - ++x; printf("%d%d",x,y); }
  • What is the output of the given program? int main() { int x = 24; int y = 42; printf("%d",(~x) | (~y) ); }
  • What is the output of the given code? int main() { int x = 24; int y = 42; int z = 37; int a = 22; printf("...
  • What would be the output of the following? void main() { int z,x=5,y=-10,a=4,b=2; z=x++ - --y *b/a; printf(...
  • void main() { int x=20,y=35; x= y++ + x++; y= ++y + ++x; printf(" %d %d" , x,y); }
  • void main() { int x=20,y=35; x= y++ + x++; y= ++y + ++x; printf(" %d %d" , x,y); }
  • What is the output of the following code? #include void main() { int a=0,b=0; a = (b = 75) + 9; printf("\n%...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy