aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Technology, History and General Knowledge Quiz
  • Output? main() { int x=20,y=35; x=y++ + x++; y= ++y + ++x...
Multiple choice general knowledge

Output? main() { int x=20,y=35; x=y++ + x++; y= ++y + ++x; printf(“%d%dn”,x,y); }

  1. 5794

  2. 5792

  3. 5744

  4. 5694

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

Tracing: x=20, y=35. x=y+++x++ uses original values: x=35+20=55, then y++ makes y=36, x++ makes x=56. y=++y+++x: y becomes 37, x becomes 57, then y=37+57=94. Output: 57 and 94.

Keep practicing — related questions

  • main() { int x=10, y=15; x = x++; y = ++y; printf(“%d %dn”,x,y); }
  • 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); }
  • Determine output: void main(){ int x,y; x = 5; y = ++x * ++x; printf("Value of x = %d and Value of y = %d\n...
  • What would be the output of the following? main() { int y,x=5; y=++x - ++x; printf("%d%d",x,y); }
  • What will be printed as the result of the operation below: main() { int x=20,y=35; x=y++ + x++; y= ++y + ++...
  • Guess the Output? void main() { int i=5; i+=i*=i-=i/i; printf("%dn",i); }
  • 3.What is the output?main() { int x=5; printf(“%d,%d,%dn”,x,x< <2,x>>2); }
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Programming Languages and Compilers (2284 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy