Q. We want to get a decimal number entered from the keyboard, which statement is correct?
β
Correct Answer: (B)
scanf("%f",&decimalNumber);
Explanation: scanf is a function declared in the <stdio.h> header, this function can be used for capturing formatted data, whether letters, numbers or strings.
%d to print integer and %f to print float value.β¨β¨
%d to print integer and %f to print float value.β¨β¨