C++ Certified Professional Programmer (CPP) - CPPL Exam Questions
Last updated on June 20, 2026
using namespace std;
template
while start = end) {
std:cout «< *start «<""; start++;
}
int main() (
string t1[] = "I", '2", "3", "4",'5", "6", "7", "8", "g", '10';
list string> 11(11, t1+ 10);
list
12. reverse); 11 splice(11.end),12);
11. uniquel);
print(|1.begin(), [1.end()); cout«
}
to join the discussion
No discussions yet. Be the first to ask!
Delete Comment
Are you sure? This action cannot be undone.
using namespace std;
template
void f(A &a)
cout<<1‹
course sendi int main()
int a = 1;
f(a);
return O;
}
to join the discussion
No discussions yet. Be the first to ask!
Delete Comment
Are you sure? This action cannot be undone.
using namespace std;
class B {int val;
public: B(int v): val (v))
int getV() const (return val;} bool operator < (const B &
v) const { return val>v.val;} ];
ostream & operator «(ostream & out, const B &
v) { out<
ostream & out;
Out(ostream & o): out(o)(
void operator() (const T & val) { out<
B t1|= (3,2,4,1,5};
B t2[] = (5,6,8,2,1);
vector v1(10,0);
sort(t1, t1+5);
sort(t2, t2+5);
set_intersection(t1,t1+5,t2,t2+5,v1.begin());
for_each(v1.begin(), v1.end(), Out(cout));cout«
Program outputs:
to join the discussion
No discussions yet. Be the first to ask!
Delete Comment
Are you sure? This action cannot be undone.
using namespace std;
template
ostream & out;
Out(ostream & o): out(o)f}
void operator() (const T & val) {out<
int t[l= (3,2,4,1,5,6,10,8,7,9);
vector
for_each(v1.begin(), v1.end(), bind2nd(plus
for_each(v1.rbegin(), v1.rend(), Out
Program outputs:
to join the discussion
No discussions yet. Be the first to ask!
Delete Comment
Are you sure? This action cannot be undone.
using namespace std;
int main()f
int t[] = ( 3, 4, 2, 1, 6, 5, 7, 9, 8, 0);
vector
set
s1.insert(v.begin(),v.end());
bool found = s1.find(7);
if (found)
cout«<"Element found! n";
Jelse (
cout«<"Element not found!\n";
return O;
}
to join the discussion
No discussions yet. Be the first to ask!
Delete Comment
Are you sure? This action cannot be undone.
Finish Practice?
Are you sure you want to finish? This will end your practice session.