aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Programming, Data Structure & Algorithm - 1
  • What is the output of the following code fragment? int i ...
Multiple choice

What is the output of the following code fragment? int i = 10; if(i = printf(“%d”, i)) { printf(“%d ”, i); }

  1. 10

  2. 0

  3. 102

  4. 2

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

null

Keep practicing — related questions

  • What is the output of the following piece of code: int x = 7; if ( x = 3 ) printf( “%d“ , x);
  • What is the output?int i = 3;if (!i) i++; i++;if (i==3) i+=2; i+=2;printf("%d\n", i);
  • int a=10,b; b=a++ + ++a; printf(%d,%d,%d,%d,b,a++,a,++a); What will be the output when following code is ex...
  • What is the output of the following code fragment? int i = 0, j = 3; while(i++<5|| j--) printf(“Hi”);
  • What will be the output of the following program : void main() { int i, n =10; for (i=1; i
  • What is the output of the following code snippet ?? void main() { printf("%d", sizeof(2.0)); }
  • What would be the output of the following C code? int i=1, j=1; int n = 1; if(n>0){i++;j--;}printf(i=%d, j=...
  • What will be the output of the following program : void main() { printf("%d",!(100==100)+1); }
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Programming Output Evaluation (1721 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy