What happens when you attempt to compile and run the following code?
#include
#include
#include
#include
#include
using namespace std;
int main()
{
int t[] ={ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
deque
queue
queue
queue
queue
mylist.clear();third.clear();
cout< cout< return 0; }
What happens when you attempt to compile and run the following code?
#include
#include
#include
using namespace std;
int main ()
{
int t[] = {1, 2 ,3 ,4 ,5};
vector
list
l1.assign(v1.end(), v1.begin());
for(int i=0; i { cout< } cout< return 0; }
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
int main ()
{
float f = 10.126;
cout< return 0; } Program outputs:
What happens when you attempt to compile and run the following code?
#include
#include
#include
#include
#include
using namespace std;
class A {
int a;
public:
A(int a):a(a) {}
int getA() const { return a;} void setA(int a){ this?>a = a;}
bool operator < ( const A & b) const { return a }; struct display { void operator() (const A & a) {cout << " " << a.getA();} }; struct add10 { void operator() (A & a) { a.setA(a.getA()+10) ;} }; int main() { int t[] = { 10, 5, 9, 6, 2, 4, 7, 8, 3, 1 }; vector v1(t, t + 10); set s1(t, t + 10); for_each(v1.begin(), v1.end(), add10()); for_each(v1.begin(), v1.end(), display()); for_each(s1.begin(), s1.end(), add10()); for_each(s1.begin(), s1.end(), display()); return 0; }
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
template
class A {
T_v;
public:
A() {}
A(T v): _v(v){}
T getV() { return _v; }
void add(T & a);
void add(string & a);
};
template
void A
void A
_v.insert(0, a);
}
int main()
{
A
string s(" world!");
a.add(s);
cout << a.getV() < return 0; }
Matthew Morris
4 days agoKaren Hernandez
16 days agoEmma Reed
8 days agoNancy Bailey
10 days agoWilliam Gonzalez
16 hours agoAndrew Nguyen
11 days agoLoise
1 month agoKyoko
1 month agoDevora
2 months agoCarlota
2 months agoFletcher
2 months agoMajor
2 months agoGwen
3 months agoKris
3 months agoDonte
3 months agoKimberlie
3 months agoMarquetta
4 months agoGlory
4 months agoFatima
4 months agoOmega
4 months agoKristin
5 months agoPaz
5 months agoRose
5 months agoMarge
5 months agoGail
6 months agoDaren
6 months agoTarra
6 months agoFannie
6 months agoPearlie
7 months agoDonte
7 months agoSilva
7 months agoGiuseppe
7 months agoAileen
8 months agoSabra
8 months agoAnnmarie
8 months agoBuffy
11 months agoDyan
1 year agoSalena
1 year agoSalley
1 year agoArlean
1 year agoCaren
1 year agoAleisha
1 year agoLanie
1 year agoJohnetta
1 year agoChristiane
1 year agoStanford
2 years agoYuette
2 years agoDallas
2 years agoIndia
2 years agoAleisha
2 years agoRoselle
2 years agoVincenza
2 years agoLyda
2 years agoNoah
2 years agoMammie
2 years agoThea
2 years agoArlean
2 years agoMargarita
2 years ago