aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Programming (C/C++)
  • What will be the output of the following function? # incl...
Multiple choice

What will be the output of the following function?

include <stdio.h>

void main() { int k,num=30; k = (num>5 ? (num <=10 ? 100:200) :500); printf(“%d”,num); }

  1. 200

  2. 30

  3. 100

  4. 500

Reveal answer Fill a bubble to check yourself
A Correct answer

Keep practicing — related questions

  • What will be the output of the following function? # include <stdio.h> void main() { int i =2,j=2; printf(“...
  • What will be the output of the given function?void main() { int a=1,b=2,c=3,d=4; printf("%d",!a?b?!c:!d:a); }
  • What will be the output of the following code? #include<stdio.h> int main() { int num,a=5; num=-a--; printf...
  • What will be the output of the following function? main() { printf(%x,-1<<4); }
  • What would be the output of the following? main() { int y,x=5; y=++x - ++x; printf("%d%d",x,y); }
  • What will be the output of the following program : void main() { printf("%d",!(100==100)+1); }
  • What is the output of the following code? #include void main() { int a=0,b=0; a = (b = 75) + 9; printf("\n%...
  • What will be the output of the following program? void func() { printf("Testing...Done"); } void main() { f...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy