Prepare for the C++ Institute CPA - C++ Certified Associate Programmer Exam exam with our extensive collection of questions and answers. These practice Q&A are updated according to the latest syllabus, providing you with the tools needed to review and test your knowledge.
QA4Exam focus on the latest syllabus and exam objectives, our practice Q&A are designed to help you identify key topics and solidify your understanding. By focusing on the core curriculum, These Questions & Answers helps you cover all the essential topics, ensuring you're well-prepared for every section of the exam. Each question comes with a detailed explanation, offering valuable insights and helping you to learn from your mistakes. Whether you're looking to assess your progress or dive deeper into complex topics, our updated Q&A will provide the support you need to confidently approach the C++ Institute CPA-21-02 exam and achieve success.
What happens when you attempt to compile and run the following code?
#include
using namespace std;
void fun(char*);
int main()
{
char t[4]={'0', '1', '2', '3'};
fun(&t[2]);
return 0;
}
void fun(char *a)
{
cout << *a;
}
How many times will "HELLO" be printed?
#include
using namespace std;
int main()
{
for(int i=?1; i<=10; i++)
{
if(i < 5)
continue;
else
break;
cout<<"HELLO";
}
return 0;
}
What is the output of the program if characters 'h', 'e', 'l', 'l' , 'o' and enter are supplied as input?
#include
#include
using namespace std;
void f();
int main()
{
f();
return 0;
}
void f()
{
char c;
c = cin.get();
cout << c;
if(c != '\n')
f();
}
What will be the output of the program?
#include
using namespace std;
int fun(int);
int main()
{
cout << fun(5);
return 0;
}
int fun(int i)
{
return i*i;
}
What will happen when you attempt to compile and run the following code?
#include
#include
using namespace std;
string fun(string, string);
int main()
{
string s="Hello";
cout << fun(s, " World");
return 0;
}
string fun(string s1, string s2)
{
return s1+s2;
}
Full Exam Access, Actual Exam Questions, Validated Answers, Anytime Anywhere, No Download Limits, No Practice Limits
Get All 257 Questions & Answers