What happens when you attempt to compile and run the following code?

What happens when you attempt to compile and run the following code?
#include using namespace std;
int main()
{
union un
{ int x; char c;
};
union un u1 = {10}; union un u2 = {‘a’}; union un u3 = {20, ‘a’}; cout<A. It prints: 10aa
B. It prints: 10a20a
C. It prints: 1a
D. Compilation error

Download Printable PDF. VALID exam to help you PASS.

Posted in: CPA

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.