What is the other name for run-time polymorphism?
What is the output of the following code?
#include<stdio.h>
int main()
{
char* s="Abekus";
*(s+2)='a';
printf("%c",s);
return 0;
}
Which of the following is the correct statement?
What is the following code calculating?
int function(int a, int b)
{
if (b == 0)
return a;
return function(b, a % b);
}
What is meant by multiple inheritance?
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
void addprint()
{
static int s = 1;
s++;
cout << s;
}
int main()
{
addprint();
addprint();
addprint();
return 0;
}
What will be the output of the following C++ code?
#include <iostream>
#include <functional>
#include <algorithm>
using namespace std;
int main()
{
int numbers[] = {10, -20, -30, 40, -50};
int cx;
cx = count_if(numbers, numbers + 5, bind2nd(less
cout << cx;
return 0;
}
What will be the output of the following C++ code?
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<bool> mask;
mask.push_back(true);
mask.flip();
cout << boolalpha;
for (unsigned i = 0; i < mask.size(); i++)
cout << mask.at(i);
return 0;
}
#include <iostream>
#include <functional>
#include <algorithm>
using namespace std;
int main ()
{
int first[] = {10, 40, 90};
int second[] = {1, 2, 3};
int results[5];
transform ( first, first + 5, second, results, divides<int>());
for (int i = 0; i < 3; i++)
cout << results[i] << " ";
return 0;
}