aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Programming Languages History and Concepts
  • What will be the output of the following program : void m...
Multiple choice technology programming languages

What will be the output of the following program : void main() { printf("%d",!(100==100)+1); }

  1. 100

  2. 0

  3. 1

  4. 2

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

The expression (100==100) evaluates to 1 (true). The ! operator negates it to 0. Then 0+1 = 1. The printf statement prints this result.

Keep practicing — related questions

  • what will be the output?? int main(int c) c=1; while(1); c++; printf("%d",++c); return 0; }
  • What will be the output of the following: void main() { int i; for(i=1;i<=4;i++) { printf("%d",i); continue...
  • The output of the following program will be main() { int a = 1, b=2, c=3; printf(“%d”, a+=(a+=3,5,a)); }
  • What will be the output of the following program : void main() { int i, n =10; for (i=1; i
  • What would be the output of the following? void main() { int a=10,b; b=a++ + ++a; printf("%d %d %d %d",b,a+...
  • What will be the output of the following program : void main() { int a=1,b=2,c=3; c=(--a, b++)-c; printf("%...
  • What is the output of the following program ? main() { int a=10; { int a=100; { int a=1000; printf("%d", a)...
  • What will be the output of the following program? void main() { int val=1234; int* ptr=&val; printf("%d %d"...
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