Cpp Programming 91 – Which of the following is an invalid visibility label while inheriting a class?
[B]. private[C]. protected
[D]. friend
Answer: Option D
Answer: Option D
Answer: Option B
#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 arr[] = {1, 2 ,3, 4, 5};
    int &zarr = arr;
    for(int i = 0; i <= 4; i++)
    {
        arr[i] += arr[i];
    }
    for(i = 0; i <= 4; i++)
        cout<< zarr[i]; 
    return 0; 
}
[A].The program will print the output 1 2 3 4 5.
[B].The program will print the output 2 4 6 8 10.
[C].The program will print the output 1 1 1 1 1.
[D].It will result in a compile time error. 
Answer: Option D
#include
class BixTeam
{
    int x, y;
    public:
    BixTeam(int xx)
    {
        x = ++xx;
    }
    void Display()
    {
        cout<< --x << " ";
    }
};
int main()
{
    BixTeam objBT(45);
    objBT.Display();
    int *p = (int*)&objBT;
    *p = 23;
    objBT.Display();
    return 0; 
}
[A].45 22
[B].46 22
[C].45 23
[D].46 23
Answer: Option A
#include 
enum xyz
{
    a, b, c
};
int main()
{
    int x = a, y = b, z = c;
    int &p = x, &q = y, &r = z;
    p = z;
    p = ++q;
    q = ++p;
    z = ++q + p++;
    cout<< p << " " << q << " " << z;
    return 0; 
}
[A].2 3 6
[B].4 4 7
[C].4 5 8
[D].3 4 6 
Answer: Option B
[B].
[C].
[D].
Answer: Option D
Explanation:
No answer description available for this question.