Ques 1 If Else
What is the output of the following code if,a=7?
int main() { int a; cin<<a; if (++a*7<=49) { cout<<"Hello"; } else { cout<<"Bye"; } }
Ques 2 If Else
What is the output of the following code?
int main() { int a = 6; if(a++==6) cout<<"Six"<<endl; else if(a==7) cout<<"Seven"<<endl; return 0; }
Ques 3 If Else
What is the output of the following code?
int main() { if(-1==-1) { cout<<"https://examprev.com"; } else { cout<<"https://smallcode.org"; } return 0; }
Ques 4 If Else
What is the output of following C++ code?
int main() { int a=90; if(a==15*6) { if(a==90) break; cout<<"SmallCode"; } cout<<"Hello SmallCode"; }
Ques 5 If Else
What is the output of following code?
int main() { int a = 1 ; a = a - 1 ; while(a) { cout<<"its a while loop"; a++ ; } return 0; }