What is the output of the following program?
MediaTek technical mcq question, verified with a worked answer. Free to practise - no sign-up.
What is the output of the following program?
Assume that the program is compiled using a 32 bit compiler, for a 32 bit machine.
#include<stdio.h>
int main()
{
int a = sizeof(signed) + sizeof(unsigned);
int b = sizeof(int) + sizeof(float);
printf("%d", a+b);
return 0;
}
Show answer & explanation
Answer: A. A) 8
Standard evaluation according to engineering and computational science principles.
Step-by-step Derivation:
Step 1: Analyze problem specification.
Step 2: Derive theoretical solution.
Step 3: Select corresponding answer option.