Professional Documents
Culture Documents
Quiz 2 Solution
Quiz 2 Solution
Quiz 2 Solution
Q1. Write down Output of following set of Codes. Assume all relevant header files have been included.
int main(){
int number = 4;
double alpha = -1.0;
if (number > 0)
if (alpha > 0)
cout<<"Here I am!"<<endl;
else
cout<<"No, I am here!"<<endl;
cout<<"No, actually, I am here!"<<endl;
Output here:
No, I am here!
No, actually, I am here!
int main(){
int x=0, i=10;
while(i < 0)
{ x++; }
cout<<x;
return 0; }
Output here: