Cpp Programming 98 – Which of the following concepts of OOPS means exposing only necessary information to client?
[B]. Abstraction
[D]. Data binding
Answer: Option C
Answer: Option C
#include
const double BixConstant(const int, const int = 0);
int main()
{
const int c = 2 ;
cout<< BixConstant(c, 10)<< " ";
cout<< BixConstant(c, 20)<< endl;
return 0;
}
const double BixConstant(const int x, const int y)
{
return( (y + (y * x) * x % y) * 0.2);
}
[A].The program will print the output 2 4.
[B].The program will print the output 20 40.
[C].The program will print the output 10 20.
[D].The program will print the output 20 4.50.
Answer: Option A
#include
class BixData
{
int x, y, z;
public:
BixData(int xx, int yy, int zz)
{
x = ++xx;
y = ++yy;
z = ++zz;
}
void Show()
{
cout<< "" << x++ << " " << y++ << " " << z++;
}
};
int main()
{
BixData objData(1, 2, 3);
objData.Show();
return 0;
}
[A].The program will print the output 1 2 3.
[B].The program will print the output 2 3 4 .
[C].The program will print the output 4 5 6.
[D].The program will report compile time error.
Answer: Option B
[A].
Only 1 is correct.
[B].Only 2 is correct.
[C].
Both 1 and 2 are correct.
[D].
Both 1 and 2 are incorrect.
Answer: Option D
Explanation:
No answer description available for this question.
[B].
[C].
[D].
Answer: Option D
Explanation:
No answer description available for this question.
Answer: Option D