What will be the output of following program?
MediaTek technical mcq question, verified with a worked answer. Free to practise - no sign-up.
What will be the output of following program?**
int main()
{
signed int bit = 512 i = 5;
for( i=1; )
{
printf("%d ", bit >> 0 - i);
}
return 0;
}
Show answer & explanation
Answer: A. A) 512, 256, 0, 0, 0
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.