aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • GATE IT - C Programming and Computer Science Fundamentals
  • What is the output of the given program snippet in C lang...
Multiple choice

What is the output of the given program snippet in C language? main() {
int x=10,a=20;
clrscr(); x=(a==!!a); printf(%d,x&&a); getch(); }

  1. 0

  2. 1

  3. 10

  4. 20

  5. No output

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

x=(a==!!a);!a=0, !!a=1 So 20 is not equal to 1. Hence x is 0.

Keep practicing — related questions

  • What will be the output of the following code snippet? main() { int a=1,b=1; clrscr(); a=++a||++b&&++a; pri...
  • What will be the output of the following code snippet? main() { int a=11,b; clrscr(); for(a%10;a++); printf...
  • What will be the result of the given code snippet in C language? main() { int x=1; clrscr(); for(;x++;x%10?...
  • What will be the output of the following code snippet? main() { int num=1; clrscr(); for(j=1;j<=6;j++) { fo...
  • What will be the output of the following C code? void main() { int fact=1,i; clrscr(); for(i=2;i<=8;i++) fa...
  • What will be the output of the code snippet? int funct(a,b) int a,b; { return a*b; } void main() { int i=13...
  • what is the output of the programme? #define ABC 20 #define XYZ 10 #define XXX ABC - XYZ void main() { int ...
  • Give the output of the following program: main( ) { int a=30,b=40,x; x=((a!=10) && (b=50)) printf(“x=%d”,x)' }
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