CPA 무료 덤프문제 온라인 액세스

시험코드:CPA
시험이름:C++ Certified Associate Programmer
인증사:C++ Institute
무료 덤프 문항수:220
업로드 날짜:2026-01-08
평점
100%

문제 1

Point out an error in the program.
#include <iostream>
using namespace std;
int main()
{
const int x=1;
int const *y=&x;
cout<<*y;
return 0;
}

문제 2

What happens when you attempt to compile and run the following code?
#include <iostream>
#include <cstdarg>
using namespace std;
int mult(int f, int s, int t);
int main()
{
cout << mult(1,2,3);
return 0;
}
int mult(int f, int s, int t) { int mult_res; mult_res = f*s*t; return mult_res; }

문제 3

What happens when you attempt to compile and run the following code?
#include <iostream> #include <string>
using namespace std;
class A {
protected:
int y;
public:
int x, z;
A() : x(1), y(2), z(0) {}
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(2,5);
b.Print();
return 0;
}

문제 4

What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
class A {
public:
int x;
A() { x=0;}
};
class B : protected A {
public:
int y;
using A::x;
B(int y) {this->y = y;}
void Print() { cout << x << y; }
};
int main () {
B b(5);
b.Print();
return 0;
}

문제 5

What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
#define DEF_A 0 #define DEF_B DEF_A+1 #define DEF_C DEF_B+1
int main(int argc, char *argv[]) {
cout << DEF_C;
return 0;
}

댓글 추가

귀하의 메일주소는 공개되지 않습니다. 필수 입력 사항은 표시되어 있습니다. *

insert code
그림의 인증번호를 입력하세요.