R

Ram Sharma • 193.86K Points
Coach

Q. What will be output of the following c code?

Code:
struct marks{
int p:3;
int c:3;
int m:2;
};
void main(){
struct marks s={2,-6,5};
printf(“%d %d %d”,s.p,s.c,s.m);
}
  • (A) 2 -6 1
  • (B) 2 2 1
  • (C) 2 -6 5
  • (D) Compiler error

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics