I am confused what are the outputs thank you

If you are not going to help please do not respond

What will be the output of
int n=4;
while (n <=13)
{ n +=3;
if (n>9)
break;
}
cout<<n;

What will be the output of
n=2;
bool stop =false;
do
{ n +=3;
cout<<n;
if(n%2==0)
stop=true;
} while (n <=13 && !stop);

What will be the output of
void fun (int &, int &, int &):
int main ()
{
int a=2, b=3, c=4;
fun ( c, b, a );
cout << a << b << c;
return 0;
}
void fun (int & x, int & y, int & z)
{
int t = z; z = y; y = x; x = t;
}
Do you have a C++ compiler ?
If you have go and write these on that and find the output .
I do not have one I just want to check my answers!!!

Is the first one: 7
secone: 5
third 234234
Last edited on
If you dont have a compiler then you should not study C++ and quit the class.
agreed

Trying to learn how to code C++ without a compiler is like trying to learn how to play guitar without a guitar.

Compilers are free -- if you're seriously trying you learn C++, you have no excuse not to have one. If you have the internet, you can get a C++ compiler. Google "Code::Blocks" or "Dev C++", or "free C++ IDE"
ms vc for student edition or express edition is also free..
Topic archived. No new replies allowed.