[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

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); 
}

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 ::

Post Your Answer Here:     

Reply    
Rate This: +2 -3 +
    Report


Report Error

Please Login First Click Here

Reply    
Rate This: +1 -0 +
    Report


Report Error

Please Login First Click Here