Functions

Q1: What will be the output of the following program?
#include<iostream.h> 
int main()
{
    float Amount;
    float Calculate(float P = 5.0, int N = 2, float R = 2.0);
    Amount = Calculate(); 
    cout<< Amount << endl; 
    return 0;
}

float Calculate(float P, int N, float R)
{
    int Year = 1;
    float Sum = 1 ;
    Sum = Sum * (1 + P * ++N * R);
    Year =  (int)(Year + Sum);
    return Year; 
}

A 21

B 22

C 31

D 32

E None of these


img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.