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

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

문제 1

What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
int x=5;
static int y;
int i=0;
void static myFunction()
{
y=x++ + ++i;
}
int main (int argc, const char * argv[])
{
x++;
myFunction();
cout<<y<<" "<<x<< " " << i;
}

문제 2

What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
void fun(int*);
int main()
{
int *x;
int i=2;
x=&i;
fun(x);
cout<<i;
return 0;
}
void fun(int *i)
{
*i = *i * *i;
}

문제 3

What is the output of the program?
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s1="World";
string s2;
s2="Hello" + s1;
cout << s2;
return( 0 );
}

문제 4

What will happen when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
int getValue();
int main()
{
const int x = getValue();
cout<<x;
return 0;
}
int getValue()
{
return 5;
}

문제 5

What happens if character 3 is entered as input?
#include <iostream>
using namespace std;
class A {
public:
int i;
};
int main () {
int c;
A obj;
obj.i = 5;
cin >> c;
try
{
switch (c)
{
case A: throw 20;
case B: throw 5.2f;
case C: throw obj;
default: cout<<"No exception";
}
}
catch (int e)
{ cout << "int exception. Exception Nr. " << e; }
catch (A e)
{ cout << "object exception. Exception Nr. " << e.i; }
catch (...)
{ cout << "An exception occurred."; }
return 0;
}

댓글 추가

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

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