0% found this document useful (0 votes)
99 views3 pages

Relational Operator Questions

The document presents a series of C programming code snippets with multiple-choice questions regarding their outputs. Each question tests the reader's understanding of operators and type conversions in C. The correct answers to the questions are provided at the end.

Uploaded by

Siddu biradar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views3 pages

Relational Operator Questions

The document presents a series of C programming code snippets with multiple-choice questions regarding their outputs. Each question tests the reader's understanding of operators and type conversions in C. The correct answers to the questions are provided at the end.

Uploaded by

Siddu biradar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1) #include<stdio.

h>
void main()
{
printf("%d\n",23+5>=5<=9*1+8%2==2);
}
a) 1
b) 0
c) 21
d) 7

2) #include<stdio.h>
void main()
{
char i='a',j='b',k='1',l='2';
printf("%d\n",i<j>=k!=l);
}
a) error
b) 0
c) 1
d) none of the above

3) #include<stdio.h>
void main()
{
int i=12;
i=i>=i<=i==i>2;
printf("%d\n",i);
}
a) 12
b) 1
c) 2
d) 0

4) #include<stdio.h>
void main()
{
int a=-7,b=-5,c=-3,d=-1;
a=a>b+1<c<d;
printf("%d\n",a>=1*2);
}
a) 0
b) 1
c) -2
d) 2
5) #include<stdio.h>
void main()
{
short int i=320;
char j=i;
printf("%d\n",i==j);
}
a) error
b) 1
c) 0
d) 320
Ans:
1) ----> b) 0
2) ----> c) 1
3) ----> b) 1
4) ----> a) 0
5) ----> c) 0

You might also like