aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java and C Programming Fundamentals
  • What would be the value of the following C code? float a;...
Multiple choice

What would be the value of the following C code? float a; a = floor(6.523); printf(!!!^!!!a = 0.2f!!!^!!!,a);

  1. a = 6.00

  2. a = 6.60

  3. a = 7.00

  4. a = 6.70

  5. Compiler error

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

This is the correct option as floor() function returns the smallest integer value to the assigned value.

Keep practicing — related questions

  • What will be the output of the following C code? void main() { double t=9.0,c=78.50; float Res; Res = (t+c)...
  • 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: void main() { float a=0.7; if(a<0.7) printf("c++"); else printf("...
  • What will be the output of the following program : void main() { printf("%f",123.); }
  • What will be the output of following program code? #include<stdio.h> main() { int k; float j; j=9.0/2; k=9/...
  • What is the right coding to find the formatted output of float value upto 4 decimal points? float a=23.76548;
  • output?? int main() { printf("%0.4f",3.414164); return 0; }
  • If the declaration is float x = 123.456, then the statement printf(“%7f %7.1f “,x,x) will print
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