What happens when you attempt to compile and run the following code?
#include
#include
#include
using namespace std;
int main(){
int t[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 };
multiset s1(t,t+10);
s1.insert(s1.find(7), 3);
for(multiset::iterator i=s1.begin();i!= s1.end(); i++) {
cout
What happens when you attempt to compile and run the following code?
#include
#include
#include
using namespace std;
template
int calculate(T start, T end)
{
int s = 0;
while (start != end)
s+= *start; start++;return s;
}
int main ()
{
int t[] = {1, 2 ,3 ,4 ,5, 6 , 7, 8 , 9, 10};
vectorv1(t, t+5);
dequed1(t+5, t+10);
cout
What will happen when you attempt to compile and run the code below, assuming that you enter the following sequence: true true?
#include
#include
using namespace std;
int main ()
{
bool a,b;
cin>>a>>b;
cout
What happens when you attempt to compile and run the following code?
#include
#include
#include
#include
#include
using namespace std;
void myfunction(int i) {
cout
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, 6 , 7, 8 , 9, 10};
vectorv1(t, t+10);
dequed1(t, t+10);
vector::iterator it1 = v1.begin();
deque::iterator it2 = d1.begin();
d1.erase(it2+5);
it2 = d1.begin();
cout