C Programming :: Basic Concepts - Discussion
Home > C Programming > Basic Concepts > MCQs Questions Discussion
32 / 90
Choose the correct option.
To print out a and b given below, which printf() statement will be used ?
float a = 3.14;
double b = 3.14;
Aprintf("%f%f', a, b);
Bprintf("%Lf%f', a, b);
Cprintf ("%Lf%Lf', a, b);
Dprintf("%f%Lf', a, b);
Answer: Option (Login/Signup)
Show Explanation
Hence, to print the values of a and b, the code should be-
printf("%f%f",a,b);
This will give the output as 3.1400003.140000.
Asked In ::
TRICK
Here, in every option we see that there is a missing terminating " character, which will result to an error.
Hence, to print the values of a and b, the code should be-
printf("%f%f",a,b);
This will give the output as 3.1400003.140000.
Read Full Answer
Report Error
Please Login First Click Here