Which statement should be added in the following program to make work it correctly?using namespace std;int main (int argc, const char * argv[]){cout<<"Hello";}
Answer(s): C
What is the output of the program?#include <iostream>using namespace std;int main(){int tab[4]={10,20,30,40};tab[1]=10;int *p;p=&tab[0];cout<<*p;return 0;}
Answer(s): A
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(1) & fun(0);cout << i;return 0;}
What happens when you attempt to compile and run the following code?#include <iostream>using namespace std;class A {public:virtual void Print()=0;};class B:public A {public:virtual void Print() { cout<< "B"; }};class C:public A {public:virtual void Print() { cout<< "C"; }};int main(){B ob2;C ob3;A *obj;obj = &ob2;obj?>Print();obj = &ob3;obj?>Print();}
Post your Comments and Discuss C++ Institute CPA-21-02 exam with other Community members:
Subash commented on October 21, 2024 I am planning to take this exam. Are these 257 questions enough to clear it? Also, does each section have a passing percentage, or is it based on the overall ? INDIA upvote