CPA 試験問題を無料オンラインアクセス
試験コード: | CPA |
試験名称: | C++ Certified Associate Programmer |
認定資格: | C++ Institute |
無料問題数: | 220 |
更新日: | 2025-08-24 |
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;
}
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);
}
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(); }