Click To Get Off-Campus Placement Jobs Info !!!

C Programming :: Declarations and Initializations - Discussion

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

11 / 54

What is the output of the following 'C' program?

#include<stdio.h>
void main() { 
int x = 10,y = 10, z = 5, i; 
i = x;
printf("%d",i==x); 
}

A1

BError

C0

D5

Answer: Option (Login/Signup)

Show Explanation

The value of x initialised is 10. Also i=x so i=10. Now when comparing condition  (i==x) it will give boolean result that is if the condition is true it will return 1 else it will return 0. So here the condition is true coz x=i hence output is 1.



 

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: +0 -0
    Report


Report Error

Please Login First Click Here