Home / MCQ Bank / Computer
Computer Structures And Unions In C Plus Plus

What will be the output of the following C++ code? #include <iostream> using namespace std; struct sec { int a; char b; }; int main() { struct sec s ={25,50}; struct sec *ps =(struct sec *)&s; cout << ps->a << ps->b; return 0; }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • 252

Related Computer Questions

Suppose the last row has the AUTO_INCREMENT column value 32. Suppose a new row is added by setting AUTO_INCREMENT value equal to 100. The next row added will have value ______ What happens if the following code is compiled on both C and C++? #include<stdio.h> struct STRUCT { private: int a; }; int main() { printf("%d\n", (int)sizeof(struct STRUCT)); return 0; } What is speculative execution in Hadoop, and when is it triggered? Which of the following css property is used to define a delay before an animation starts? What is the auxiliary space requirement of the quickselect algorithm?