Which of the following operators accept integer arguments only? (Choose two.)
A. |
B. | |
C. ~
D. !
Which of the following is a user defined data type?
1:
struct person
{
char name[20];
int age;
};
2:
int l=2;
3:
enum color {red,blue, green};
D.
char c;
B.
2
C.
3
D.
4
What 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 World
B. It will print: Hello
C. It will print: World
D. It will print: HW
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class A {
protected:
int y;
public:
int x,z;
A() : x(2), y(2), z(1) { z = x + y; }
A(int a, int b) : x(a), y(b) { z = x + y;}
void Print() { cout << z; }
};
class B : public A {
public:
int y;
B() : A() {}
B(int a, int b) : A(a,b) {}
void Print() { cout << z; }
};
int main () {
A b;
b.Print();
return 0;
}
A. It prints: 4
B. It prints: 0
C. It prints: 3
D. It prints: 2
How many times will the program print "HELLO" ?
#include
using namespace std;
int main()
{
cout<<"HELLO";
main();
return 0;
}
A. 65536
B. 32769
C. 1
D. Till stack overflows
What happens when you attempt to compile and run the following code?
#include
using namespace std;
void print(char *c);
int main (int argc, const char * argv[])
{
print("Test");
return 0;
} void print(char *c) { cout< A. It prints: Test B. It prints: T C. It prints: st D. None of these
Which of the following operations is INCORRECT?
A. int i=15;
B. long int k=123
C. float f=12,2;
D. double d=12;
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.