Home » Interview » Technology

What is the output of this program? #include 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; }

Correct Answer: 252

Explanation:

In this program, We are dividing the values of a and b, printing it.


← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion