What happens when you attempt to compile and run the following code?#include <deque>#include <iostream>#include <algorithm>#include <set>using namespace std;template<class T>struct Out {ostream & out;Out(ostream & o): out(o){}void operator() (const T & val ) { out<<val<<" "; }};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<<includes(s,s+6, t1,t1+3, Compare)<<" "<<includes(s,s+6, t2,t2+3, Compare)<<endl; return 0;}Program outputs:
A. 0 0
B. 0 1
C. 1 0
D. 1 1
What happens when you attempt to compile and run the following code?#include <deque>#include <iostream>#include <algorit
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What happens when you attempt to compile and run the following code?#include <deque>#include <iostream>#include <algorit
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!