How many main iterators are needed for defining a new container?
What is the Roman numeral representation of the decimal number 980?
Which of these expressions will make the rightmost set bit zero in an input integer x?
What will be the output?
#include <iostream>
using namespace std;
int main ()
{
int x, y;
x = 2;
y = ++x * ++x;
cout << x << y;
x = 2;
y = x++ * ++x;
cout << x << y;
return 0;
}
What will be the output of the following pseudo-code when parameters are passed by reference and dynamic scoping is assumed?
a=3; void n(x) {x = x * a; print(x);} void m(y) {a = 1; a = y - a; n(a); print(a);} void main() {m(a);}
What will be the output of the following C program?
#include <stdio.h>
int main()
{
if (1)
{
label_1: printf("Hello ");
goto label_2;
}
else
{
goto label_1;
label_2: printf("Geeks");
}
return 0;
}
What is dynamic binding?
What are the points true for const and final keywords in c++?
What happens if the following C++ statement is compiled and executed?
int *ptr = NULL;
delete ptr;
What will be the output of the following C++ code?
#include <iostream>
#include <functional>
#include <algorithm>
using namespace std;
int main() {
int numbers[] = {3, -4, -5};
transform(numbers, numbers + 3, numbers, negate<int>());
for (int i = 0; i < 3; i++)
cout << numbers[i] << " ";
}