Question
1.What is the output of the below code snippet? int a = 20, b =40, c = 15; if(a>b || b>c) printf(%d , a+b); else
1.What is the output of the below code snippet? int a = 20, b =40, c = 15; if(a>b || b>c) printf("%d ", a+b); else printf(%d,c);
a.
40
b.
15
c.
20
d.
60
2.What is the output of the below code snippet? int a = 5, b = 3, c = 4; if(a>b&&b>c) printf("%d ", b*b); else printf(%d,a*a);
a.
25
b.
9
c.
4
d.
5
3.
What is the output of the below code snippet? float avg=45.5; if(avg>50 && avg <=70) printf(Good score); else if(avg<50 && avg>=40) printf(Can do better); else printf(Work hard);
a.
Work Hard
b.
Good Score
c.
Error
d.
Can do better
4.
What should be the value of x for the below code to print OMAN? if(x>10 && x%5==0) printf(OMAN); else printf(INDIA);
a.
15
b.
5
c.
12
d.
10
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started