aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Data Types, Variables and Storage Classes
  • What will be the output of the following set of code afte...
Multiple choice

What will be the output of the following set of code after execution?

void main() { float m=3.6e38; printf(“%f”,m); }

  1. +INF

    • INF
  2. 0.000000

  3. Garbage value

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

Range is not wraps around in case of float datatype. So, if float value is outside the range on +ve side, then output will be +INF (+ infinity).

Keep practicing — related questions

  • What will be the output of the following set of codes after execution? void main() { printf(“%d”,sizeof(' '...
  • What will be the output of the following set of codes after execution? void main() { int m=32769; unsigned ...
  • What will be the output of the following set of code after execution? void main() { printf(“%c %d”,'C','C'); }
  • The program main() { float b = 0.7; printf(“%d, %f”,b,b); } prints
  • What will be the output of the following program: void main() { float val=2.; printf("%.2",val); }
  • What will be the output of the following set of codes after execution? void main() { printf(“%d %d %d ”,56,...
  • what is the output? int a = 400; void main() { int b; b=(400 * 400)/ a ; printf("%d",b); }
  • What will be the output of the following program : void main() { printf("%f",123.); }
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