What will be the output of following program? Justify your answer.
#include<stdio.h>
void main()
{
int a,b,c;
a=9;
b=10;
c=(b<a||b>a);
printf(“\n c=%d”,c);
}
#include<stdio.h>
void main(){
int a,b,c;
a=9;
b=10;
c=(b<a||b>a);
//b<a = true: 1
//b>a = true: 1
//output: 1 || 1 = 1
printf("\n c=%d",c);
scanf("%d",&a);
}
Comments
Leave a comment