adplus-dvertising
frame-decoration

Question

Which of the following statement is correct about the program given below?
#include<iostream.h>
void Tester(float xx, float yy = 5.0);
class Compscibits
{
    float x; 
    float y; 
    public:
    void Tester(float xx, float yy = 5.0)
    {
        x = xx;
        y = yy;
        cout<< ++x % --y; 
    }
};
int main()
{
    Compscibits objBits;
    objBits.Tester(5.0, 5.0);
    return 0; 
}#include<iostream.h>
const double BitsConstant(const int, const int = 0);
int main()
{
    const int c = 2 ;
    cout<< BitsConstant(c, 10)<< " "; 
    cout<< BitsConstant(c, 20)<< endl; 
    return 0;
}
const double BitsConstant(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: (a).The program will print the output 2 4.

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following statement is correct about the program given below?

Similar Questions

Discover Related MCQs

Q. The variable that are listed in the function's calls are called

Q. A programmer can create custom header files that must be end with

Q. Unary scope resolution operator is denoted by

Q. To make large programs more manageable programmers modularize them into subprograms that are called

Q. The maths function acos (x) stands for

Q. Which from the following is not a storage class specifier in C++?

Q. Which of the following function returns no value?

Q. A variable that is declared inside a block is called

Q. For accessing a global variable when a local variable of the same name is in scope, C++ provides a

Q. The () parenthesis in a function call

Q. Modules in C++ are called

Q. Which from the following is used for invoking a function?

Q. There are how many ways to invoke a function in C++?

Q. All variables declared in function definition are called

Q. Which operator is used for accessing global variables if the local variable of same name exists in the code?

Q. A function that need no return value, is called

Q. An identifier's scope is

Q. The standard C library file < stdlib.h> is used for

Q. Not initializing a reference variable will cause

Q. In which circumstances the recursion function is called?