[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 :: Declarations and Initializations - Discussion

Home > C Programming > Declarations and Initializations > MCQs Questions Discussion

15 / 54

What is the output of the following "c" program?

#include<stdio.h>
void main()
{
int i = 107, x = 5;
printf ((x > 7)? "%d" : "%c:, i)
}

Aan execution error

Ba syntex error

Cprinting of k

Dnone of these

Answer: Option (Login/Signup)

Show Explanation

printf ((x > 7)? "%d" : "%c:, i) x value assigned is 5 hence 5 is not greater than 7 so second condition i.e (%c:i)



will be executed means ascii value of small k is 107 so the character k will be printed. 

Asked In ::

Post Your Answer Here:     

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here

Reply    
Rate This: +1 -0 +
    Report


Report Error

Please Login First Click Here

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here