ExamVeda
Login
Home
61
Which of the following is illegal?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
62
What will be the output of the following C++ code?
#include <iostream>
#include <string>
#include <cstdlib>
 
using namespace std;
 
int main(int argc, char const *argv[])
{
	int a = 5;
	int *p = &a;
	int *(&q) = p;
	cout<<q;
	return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
63
Which one of the following is not a possible state for a pointer.
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
64
Which value can we not assign to reference?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
65
What will be the output of the following C++ code?
#include <iostream>  
using namespace std;
int f(int &x, int c) 
{
   c  = c - 1;
   if (c == 0) return 1;
   x = x + 1;
   return f(x, c) * x;
} 
int main(int argc, char const *argv[])
{
	int a = 4;
	cout<<f(a,a);
	return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
66
What will be the output of the following C++ code?
#include <iostream>
#include <string>
#include <cstdlib>
 
using namespace std;
 
int main(int argc, char const *argv[])
{
	int &q = NULL;
	cout<<q;
	return 0;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
67
Which reference modifier is used to define the reference variable?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
68
The operator used for dereferencing or indirection is . . . . . . . .
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
69
What will be the output of the following C++ code?
#include <iostream>
#include <string>
#include <cstdlib>
 
using namespace std;
 
int main(int argc, char const *argv[])
{
	int &q = 5;
	cout<<q;
	return 0;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
70
When does the void pointer can be dereferenced?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board