What happens if characters 'w', 'o', 'r', 'l' and 'd' are entered as input?
#include
#include
using namespace std;
int main()
{
string s1 = "Hello";
string s2;
getline( cin, s2 );
cout << s1 + s2;
return( 0 );
}
A. It prints: HelloworldWhat happens when you attempt to compile and run the following code?
#include
using namespace std;
namespace myNamespace1
{
int x = 5;
int y = 10;
}
namespace myNamespace2
{
float x = 3.14;
float y = 1.5;
}
int main () {
{
using namespace myNamespace1;
cout << x << " ";
}{
using namespace myNamespace2;
cout << y;
}
return 0;
}
A. It prints: 5 1.5What happens when you attempt to compile and run the following code?
#include
using namespace std;
void fun(int*);
int main()
{
int *x;
int i=2;
x=andi;
fun(x);
cout<
return 0;
}
void fun(int *i)
{
*i = *i * *i;
}
A. It prints: 2What happens when you attempt to compile and run the following code?
#include
using namespace std;
int op(int x, int y)
{
return x?y;
}
int op(int x, float y)
{
return x+y;
}
int main()
{
int i=1, j=2, k, l;
float f=0.23;
k = op(i, j);
l = op(j, f);
cout<< k << "," << l;
return 0;
}
A. It prints: ?1,?1What will the variable "age" be in class B?
class A {
int x;
protected:
int y;
public:
int age;
};
class B : protected A {
string name;
public:
void Print() {
cout << name << age;
}
};
A. publicWhat happens when you attempt to compile and run the following code? #include
using namespace std;
int main()
{
int *a= new int;
*a=100;
cout << *a;
delete a;
}
A. It prints: 1What will happen when you attempt to compile and run the following code?
#include
#include
using namespace std;
string fun(string, string);
int main()
{
string s="Hello";
cout << fun(s, " World");
return 0;
}
string fun(string s1, string s2)
{
return s1+s2;
}
A. It will print: Hello WorldWhat is the output of the program?
#include
#include
using namespace std;
int main()
{
string s1="World";
string s2;
s2="Hello" + s1;
cout << s2;
return( 0 );
}
A. It prints: HelloWorldWhat happens when you attempt to compile and run the following code?
#include
using namespace std;
int main(){
int i = 1;
if (--i==1) {
cout << i;
} else {
cout << i-1;
}
return 0;
}
A. It prints: 0Which of the following operators accept integer arguments only? (Choose two.)
A. |Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only C++ Institute exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your CPA-21-02 exam preparations and C++ Institute certification application, do not hesitate to visit our Vcedump.com to find your solutions here.