aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C++ Programming Fundamentals
  • #include const int SIZE = 5; struct tester { int array[SI...
Multiple choice technology programming languages

#include const int SIZE = 5; struct tester { int array[SIZE]; enum { SIZE = 3 }; void size() { std::cout << sizeof(array) / sizeof(int); } }; int main(int argc, char** argv) { tester t; t.size(); return 0; }

  1. 5

  2. 3

  3. 0

  4. undefined

Reveal answer Fill a bubble to check yourself
D Correct answer

Keep practicing — related questions

  • const int x = 5; int main(int argc, char** argv) { int x[x]; int y = sizeof(x) / sizeof(int); return 0; }
  • What is the value of y at the end of main? const int x = 5; int main(int argc, char** argv) { int x[x]; int...
  • #include main (){ char c[] = "Hello"; char *p = "Hello"; printf("Size of c: %d Addr of c:%x\n",sizeof(c),c); }
  • What does the following do: void afunction(int *x) { x=new int; *x=12; } int main() { int v=10; afunction(&...
  • void main() { struct { int EmpNo; } var; var.EmpNo=193149; printf("EmpNo: %d",var.EmpNo); }
  • 1)void main() { int const *p = 5; printf(“%d”,++(*p)); }
  • void main() { struct { int EmpNo; } var; var.EmpNo=193149; printf("EmpNo: %d",var.EmpNo); }
  • What will be the output of the following code? int main{ const int x = 1; x++; }
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy