If class A is friend of class B and if class B is friend of class C, which of the following is true? | CPP MCQs

a. Class C is friend of class A
b. Class A is friend of class C
c. Class A and Class C do not have any friend relationship
d. None of the above

Ans: c

1 comments:

Unknown said...

Hi There,

Interesting piece!Great to see someone write CPP MCQs who is not a fanatic or a complete skeptic.

ell me round off a real number in 2nd decimal place: input-> output; 7.632342534245 -> 7.60; 8.85 -> 8.90; 3.96 -> 4.00

i wrote below code which is working but my problem is if it more than two decimal value i have to change every time the 10 to 100. so tell me how can i solve this problem.
Code:
#include

int main()
{
//int *precison=3;

float bill_amount,m,a,d;

printf("enter the bill amount ");

scanf("%f",&bill_amount);

printf("entered bill amount:%f\n",bill_amount);

m=bill_amount*10;

a=m+0.5;

d=a/10;

printf("m=%.2f\n",m);

printf("a=%.2f\n",a);

printf("d=%.2f\n",d);

}

Thanks a lot. This was a perfect step-by-step guide. Don’t think it could have been done better.

Ciao,
Preethi.

Post a Comment

Blogger news