a) scripted directive b) executed directive c) link directive d) executed & link directive Answer: a Explanation: ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
#define MAX 10
int main()
{
int num;
num = ++MAX;
cout << num;
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
#define PR(id) cout << “The value of ” #id ” is “<< id
int main()
{
int i = 10;
PR(i);
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
#define SquareOf(x) x * x
int main()
{
int x;
cout << SquareOf(x + 4);
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View QuestionWhat is the mandatory preprocessor directive for c++?
a) #define <iostream> b) #include <iostream> c) #undef <iostream> d) #macro <iostream> Answer: b Explanation: For a c++ ...
View QuestionHow many types of macros are there in c++?
a) 1 b) 2 c) 3 d) 4 Answer: b Explanation: There are two types of macros. They ...
View QuestionWhich symbol is used to declare the preprocessor directives?
a) # b) $ c) * d) ^ Answer: a Explanation: # symbol is used to ...
View Questionwhich keyword is used to define the macros in c++?
a) macro b) define c) #define d) #macro Answer: c Explanation: #define is the keyword ...
View Question
What is the meaning of the following declaration?
int(*ptr[5])();
What is the meaning of the following declaration? int(*ptr[5])(); a) ptr is pointer to function b) ...
View Questionwhich of the following can be passed in function pointers?
a) variables b) data types c) functions d) objects Answer: c
View Question