adplus-dvertising
frame-decoration

Question

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 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
{ ... }

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

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. 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?