Which of the following data types will not return a value?
Which header file is required to use the built-in functors in C++?
Which design patterns benefit from multiple inheritance?
What are the parts of the literal constants?
What is the output of the following C code?
void main()
{
int i = -2;
printf("%d", i+++++i);
}
What is the output of the following C code?
int main()
{
int x;
x = 10, 20, 30;
printf("%d", x);
return 0;
}
Which of the following is correct about this pointer
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
char *ptr;
char Str[] = "abcdefg";
ptr = Str;
ptr += 5;
cout << ptr;
return 0;
}
What will be the output of the following C code?
#include <stdio.h>
#define MAX 4
enum abekus
{
a, b = 3, c
};
int main()
{
if (MAX != c)
printf("Hello");
else
printf("Welcome");
return 0;
}
What will be the output of the following C++ code?
#include <iostream>
#include <string>
using namespace std;
class Mammal
{
public:
virtual void Define(){
cout << "I'm a Mammal\n";
}
};
class Human: public Mammal
{
public:
void Define(){
cout << "I'm a Human\n";
}
};
class Male: public Human
{
public:
void Define(){
cout << "I'm a Male\n";
}
};
class Female: public Human
{
public:
void Define(){
cout << "I'm a Female\n";
}
};
int main(int argc, char const *argv[])
{
Mammal *M = new Mammal();
Male m;
Female f;
*M = m;
M->Define();
M = &m;
M->Define();
return 0;
}