Programming Question. Help!!!

Thread Starter

Ricky Sum

Joined May 6, 2016
Hi, I have a programming question and I have answered it but not sure was it correct. Please advise. Thank

void ShowCost( float fltCost )

Identify the errors in the following statements, if any, in calling the function showCost().

A. showcost(fltTotal);

Answer: Case sensitive, this will fail

B. ShowCost( float fltTotal);

Answer: When calling the function, you pass the (float) parameter, don't declare it as 'float'

C. ShowCost();

Answer: A (float) parameter must be passed to the function.

D. fltPrice = ShowCost(fltTotal);

Answer: The function does not return a value, so "fltPrice = " is wrong.

Answer: A correct call to the function:- ShowCost(fltTotal);