[A].
[B].
[C].
[D].
Answer: Option C
Explanation:
No answer description available for this question.
[B].
[C].
[D].
Answer: Option C
Explanation:
No answer description available for this question.
[B].
[C].
[D].
Answer: Option B
Explanation:
The statement 1 and 2 does not yield the base address of the array. While the scanf() and printf() yields the base address of the array.
[B].
[C].
[D].
Answer: Option A
Explanation:
No answer description available for this question.
#include
int BixFunction(int m)
{
m *= m;
return((10)*(m /= m));
}
int main()
{
int c = 9, *d = &c, e;
int &z = e;
e = BixFunction(c-- % 3 ? ++*d :(*d *= *d));
z = z + e / 10;
cout<< c << " " << e;
return 0;
}
Answer: Option D
#include
int main()
{
int x = 10, y = 20;
int *ptr = &x;
int &ref = y;
*ptr++;
ref++;
cout<< x << " " << y;
return 0;
}
[A]. The program will print the output 10 20.
[B]. The program will print the output 10 21.
[C]. The program will print the output 11 20.
[D]. The program will print the output 11 21.
Answer: Option B
#include
class BixBase
{
int x;
public:
BixBase(int xx = 0)
{
x = xx;
}
void Display()
{
cout<< x ;
}
};
class BixDerived : public BixBase
{
int y;
public:
BixDerived(int yy = 0)
{
y = yy;
}
void Display()
{
cout<< y ;
}
};
int main()
{
BixBase objBase(10);
BixBase &objRef = objBase;
BixDerived objDev(20);
objRef = objDev;
objDev.Display();
return 0;
}
[A].0
[B].10
[C].20
[D].Garbage-value
Answer: Option C
#include
int main()
{
int m = 2, n = 6;
int &x = m++;
int &y = n++;
m = x++;
x = m++;
n = y++;
y = n++;
cout<< m << " " << n;
return 0;
}
[A].The program will print output 3 7.
[B].The program will print output 4 8.
[C].The program will print output 5 9.
[D].The program will print output 6 10.
Answer: Option E
#include
int main()
{
int m = 2, n = 6;
int &x = m;
int &y = n;
m = x++;
x = m++;
n = y++;
y = n++;
cout<< m << " " << n;
return 0;
}
[A].The program will print output 2 6.
[B].The program will print output 3 7.
[C].The program will print output 4 8.
[D].The program will print output 5 9.
Answer: Option C
#include
int main()
{
int x = 0;
int &y = x; y = 5;
while(x <= 5)
{
cout<< y++ << " ";
x++;
}
cout<< x;
return 0;
}
[A].The program will print the output 5 6 7 8 9 10.
[B].The program will print the output 5 6 7 8 9 10 7.
[C].The program will print the output 5 7.
[D].It will result in a compile time error.
Answer: Option C
#include
class IndiaBix
{
int x, y;
public:
IndiaBix(int xx = 0, int yy = 0)
{
x = xx;
y = yy;
}
void Display()
{
cout<< x << " " << y;
}
IndiaBix operator +(IndiaBix z)
{
IndiaBix objTemp;
objTemp.x = x + z.x;
objTemp.y = y + z.y;
return objTemp;
}
};
int main()
{
IndiaBix objBix1(90, 80);
IndiaBix objBix2(10, 20);
IndiaBix objSum;
IndiaBix &objRef = objSum;
objRef = objBix1 + objBix2;
objRef.Display();
return 0;
}
[A].It will result in a runtime error.
[B].It will result in a compile time error.
[C].The program will print the output 9 4.
[D].The program will print the output 100 100.
Answer: Option D