What happens when you attempt to compile and run the following code?
#include
using namespace std;
int min(int a, int b);
int main()
{
int b=10;
b = min(5,20);
cout << b;
return 0;
}
int min(int a, int b)
{
if (a
return(a);
else
return(b);
}
What will happen when you attempt to compile and run the following code?
#include
using namespace std;
int main (int argc, const char * argv[])
{
enum state { ok, error, warning};
enum state s1, s2, s3;
s1 = ok;
s2 = warning;
s3 = error;
s4 = ok;
cout << s1<< s2<< s3;
return 0;
}
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
int main()
{
string s1[]= {"How" , "to" };
s1[0].swap(s1[1]);
for (int i=0; i<2; i++) {
cout << s1[i];
}
return( 0 );
}
What happens when you attempt to compile and run the following code?
#include
using namespace std;
int main()
{
const char *s;
char str[] = "Hello";
s = str;
while(*s) {
cout << *s++;
}
return 0;
}
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
int main()
{
string s1[]= {"How" , "to" };
s1[0].swap(s1[1]);
for (int i=0; i<2; i++) {
cout << s1[i];
}
return( 0 );
}
Margo
7 days agoCarla
1 months agoRossana
2 months agoAshton
2 months ago