What is the output of following code?
p=10, q=3; r=-2;
if((p+q)<14&&(r<q-3)) cout<<r;
else cout<<p;
a) -2
b) 4
c) 9
d) 4
What is the output of following code?
if((‘A’==’A’) && (‘B’==’B’) &&(‘C’==’c’)) cout<<”equal’;
else cout<<”Not equal”;
a) Not equal
b) equal
c) no output
d) both a & b
What is the output of following?
if(9<5) cout<<”x”;
else
if((5==6) cout<<”#”;
else cout<<”@”;
a) x
b) #
c) @
d) none of these
What is the output of following code for input data 25 35 20?
cin>>a>>b>>c;
if(a>b && a>c) m=a;
else if (b>c) m=b;
else m=c;
a) 35
b) 25
c) 34
d) 31
What is the output of following code for input data 35 30 36 24?
cin>>a >>b>>c>>d;
if(a>b || a>c && c!=d) m=a;
else if (b>d) m=b;
else m=c;
a) 35
b) 45
c) 31
d) 40
What is the opposite of logical expression (1<x && x<100)?
a) x<=1 || 100<=x
b) !(1<x && x<100)
c) both a & b
d) none of these