What will happen in the following C++ code snippet? int a = 100, b = ...
View QuestionWhich of the following is illegal?
a) int *ip; b) string s, *sp = 0 c) int i; double* dp = & i; d) int *pi ...
View QuestionWhich one of the following is not a possible state for a pointer.
a) hold the address of the specific object b) point one past the end of an object c) zero
View Question
Choose the right option.
string* x, y;
Choose the right option. string* x, y; a) x is a pointer to a string, y is ...
View QuestionThe operator used for dereferencing or indirection is ____
a) * b) & c) -> d) ->> Answer: a Explanation: * is used as dereferencing ...
View Question
What does the following statement mean?
int (*fp)(char*)
What does the following statement mean? int (*fp)(char*) a) pointer to a pointer b) pointer to an array ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int i;
enum month
{
JAN = 1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
};
for (i = MAR; i <= NOV; i++)
cout << 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;
int main()
{
enum channel {star, sony, zee};
enum symbol {hash, star};
int i = 0;
for (i = star; i <= zee; i++)
{
printf(“%d “, 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;
enum colour
{
green, red, blue, white, yellow, pink
};
int main()
{
cout << green<< red<< blue<< white<< yellow<< pink;
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;
enum test
{
A = 32, B, C
};
int main()
{
cout << A << B<< C;
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View Question