Q. Which operator is having right
to left
associativity in the following?
Q. What is the use of dynamic_cast
operator?
Q. What is the output of the following C++ program?
#include<iostream>
using namespace std;
int main()
{
int array[] = {10, 20, 30};
cout << -2[array];
return 0;
}
Q. Which of the following statement is true about preprocessor directives?
Q. What is the output of the following C++ program?
#include<iostream>
using namespace std;
int main()
{
cout<< strcmp("strcmp()","strcmp()");
return 0;
}
Q. Pick out the correct statement about string template
?
Q. What is the output of the following C++ program?
#include<iostream>
#include <string.h>
using namespace std;
template <typename T>
void print_mydata(T output)
{
cout << output << endl;
}
int main()
{
double d = 5.5;
string s("Hello World");
print_mydata( d );
print_mydata( s );
return 0;
}
Q. What is used to describe the function using placeholder
types?
Q. When struct
is used instead of the keyword
class, what will happen in the program?
Q. How many ways of reusing are there in class hierarchy?
Q. What will happen when we introduce the interface of classes in a run-time polymorphic hierarchy?
Q. Which classes are called as mixin
?
Q. What is the default calling convention for a compiler in c++?
Q. How can you access the arguments that are manipulated in the function?
Q. What will initialise the list of arguments in stdarg.h
header file?