Functions and Subroutines

Q1: If a function fun() is to receive an int, a Single & a double and it is to return a decimal then which of the following is the correct way of defining this function?

A
decimal static fun(int i, Single j, double k)
{ ... }

B
decimal static fun(int i, Single j, double k)
{ ... }

C
static decimal fun(int i, Single j, double k)
{ ... }

D
static decimal fun(int i, Single j, double k) decimal
{ ... }

E
static fun(int i, Single j, double k)
{ 
    ... 
    return decimal;
}

ANS:C -

static decimal fun(int i, Single j, double k)
{ ... }

No answer description is available. Let's discuss.



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.