aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C++ Based Questions
  • What is the result of the following statement? cout<
Multiple choice

What is the result of the following statement? cout<<sizeof(float);

  1. 4.000000

  2. 2

  3. 4

  4. 8

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

The sizeof operator returns the size of a type in bytes. On most modern systems, a float occupies 4 bytes of memory.

Keep practicing — related questions

  • What will be the output of the following C++ statement? cout<<4.5%3;
  • float x=10,*p,**q,***r; p=&x; q=&p; r=&q; what is sizeof(**r)? (in 16 bit machine)
  • What will be the output after executing the following statements? cout.width(5); cout <<543;
  • What is the output of the following code snippet ?? void main() { printf("%d", sizeof(2.0)); }
  • What will be the output of the following: void main() { float a=0.7; if(a<0.7) printf("c++"); else printf("...
  • What is the outcome of the line of code "cout<
  • What is the output of the following expression? int a=16,b= -8; cout<
  • What is the output of the following expression? int a=16,b= -8; cout<
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy