Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

C++ Institute CPP Exam - Topic 8 Question 48 Discussion

Posted by Edna on May 06, 2022 at 01:40 PM

What happens when you attempt to compile and run the following code?

#include

using namespace std;

template

void g(int a)

{

cout<

}

template

void g(A a)

{

cout<

}

int main()

{

int a = 1;

g(a);

return 0;

}

Suggested Answer: B

Get Premium CPP Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
7 comments · newest first
GE
Geoffrey 11 months ago
Huh, I thought templates were more complicated than this!
MO
Monroe 12 months ago
Totally agree, it outputs 2!
SC
Scarlet 12 months ago
Wait, is there a compilation error here?
ME
Melynda 12 months ago
I think it should just print 1, right?
JE
Jettie 1 year ago
The second template will be called, so it prints 2.
LO
Lorean 1 year ago
This seems like a tricky one. I'm not sure if I should go with creating a new group in the LDAP directory or using a project role. Might need to think this through carefully.
DE
Desmond 1 year ago
Easy peasy! Install the unmanaged package, install the managed package, and make sure Chatter is enabled. The console view and contact-account settings are just extras.
0/2000 characters

Save Cancel