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 Exam CPP Topic 4 Question 88 Discussion

Actual exam question for C++ Institute's CPP exam
Question #: 88
Topic #: 4
[All CPP Questions]

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

#include

#include

#include

#include

using namespace std;

templatestruct Out {

ostream & out;

Out(ostream & o): out(o){}

void operator() (const T & val ) { out<

};

bool Compare(char a, char b) { return tolower(a) < tolower(b);}

int main() {

char s[]={"qwerty"};

char t1[]={"ert"};

char t2[]={"ERT"};

sort(s, s+6);

cout<

return 0;

}

Program outputs:

Show Suggested Answer Hide Answer
Suggested Answer: E

Contribute your Thoughts:

Rickie
8 days ago
Why do you think it's C) 1 0?
upvoted 0 times
...
Skye
10 days ago
I disagree, I believe the correct answer is C) 1 0.
upvoted 0 times
...
Rickie
11 days ago
I think the answer is B) 0 1.
upvoted 0 times
...

Save Cancel