C Programming :: Increment-Decrement - Discussion
Home > C Programming > Increment-Decrement > MCQs Questions Discussion
2 / 45
What will be output of the following "c" code?
#include<stdio.h>
void main(){
int i=5,j=10,num;
num=(++i,++j,i+j);
printf("%d %d %d",num,i,j);
}
#include<stdio.h>
void main(){
int i=5,j=10,num;
num=(++i,++j,i+j);
printf("%d %d %d",num,i,j);
}
A17 6 11
B6 6 11
C15 6 11
D15 5 10
ECompilation error
Answer: Option (Login/Signup)
Show Explanation
Seen below how it will
Num=(++I=1+5=6,++j=1+10=11,I+j=6+11=17);
Asked In ::
STEP-BY-STEP
Int =5 is replace with 6, j=10 replace with 11,num;
Seen below how it will
Num=(++I=1+5=6,++j=1+10=11,I+j=6+11=17);
Read Full Answer
Report Error
Please Login First Click Here