#include <iostream>
using namespace std;
int main()
{
int *p;
void *vp;
if (vp == p)
cout << "equal";
return 0;
}Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
98
Questions
5/5
Page
Pick an option on a question to see the right answer and solution.
#include <iostream>
using namespace std;
int main()
{
int *p;
void *vp;
if (vp == p)
cout << "equal";
return 0;
}Select an option to see the answer and solution.
#include<iostream>
using namespace std;
int &fun()
{
static int x = 10;
return x;
}
int main()
{
fun() = 30;
cout << fun();
return 0;
}Select an option to see the answer and solution.
#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<<p;
return 0;
}Select an option to see the answer and solution.
#include <iostream>
using namespace std;
int func(void *Ptr);
int main()
{
char *Str = "abcdefghij";
func(Str);
return 0;
}
int func(void *Ptr)
{
cout << Ptr;
return 0;
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
#include <iostream>
using namespace std;
int main()
{
int a = 5, c;
void *p = &a;
double b = 3.14;
p = &b;
c = a + b;
cout << c << '\n' << p;
return 0;
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
int (*fp)(char*)Select an option to see the answer and solution.
#include <iostream>
using namespace std;
int main()
{
int arr[] = {4, 5, 6, 7};
int *p = (arr + 1);
cout << arr;
return 0;
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
#include<iostream>
using namespace std;
int &fun()
{
int x = 10;
return x;
}
int main()
{
fun() = 30;
cout << fun();
return 0;
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
#include <iostream>
using namespace std;
int main()
{
int arr[] = {4, 5, 6, 7};
int *p = (arr + 1);
cout << *p;
return 0;
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
#include <iostream>
using namespace std;
int main()
{
int a = 9;
int & aref = a;
a++;
cout << "The value of a is " << aref;
return 0;
}Select an option to see the answer and solution.