Q:
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;
}
Answer & Explanation
Answer: A) 252
Explanation: In this program, We are dividing the values of a and b, printing it.
View Answer
Report Error
Discuss