Single Choice Not Set

QConsider the following program fragment, and choose the correct one

#include<stdio.h> 
void main()
{
   int a, b = 2, c;
   a = 2 * (b++);
   c = 2 * (++b);
   printf("a=%d, c=%d",a,c);
 
}

ID: #1203 Operators and Enums in C Language 4,262 views
Question Info
#1203Q ID
Not SetDifficulty
Operators and Enums in C LanguageTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A a = 4, c = 8
  • B a = 3, c = 8
  • C b = 3, c = 6
  • D a = 4, c = 6
Correct Answer

Explanation

a = 4, c = 8

Share This Question

Challenge a friend or share with your study group.