CPA 試験問題を無料オンラインアクセス

試験コード:CPA
試験名称:C++ Certified Associate Programmer
認定資格:C++ Institute
無料問題数:220
更新日:2025-08-24
評価
100%

問題 1

What is the output of the program given below?
#include <iostream>
using namespace std;
int main (int argc, const char * argv[])
{
int i=10;
{
int i=0;
cout<<i;
}
cout<<i;
return 0;
}

問題 2

What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
int min(int a, int b);
int main()
{
int min(int,int);
int b;
b = min(10,20);
cout << b;
return 0;
}
int min(int a, int b)
{
return(b);
}

問題 3

What is not inherited from the base class?

問題 4

What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
class A
{
public:
void Print(){ cout<<"A";}
};
class B:public A
{
public:
virtual void Print(){ cout<< "B";}
};
int main()
{
A *obj;
A ob1;
obj = &ob1; obj->Print(); B ob2; obj = &ob2; obj->Print(); }

問題 5

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

コメントを追加

あなたのメールアドレスが公開されることはありません。個人情報に関する内容は隠されます *

insert code
画面にある文字を入力してください。