Input / Output - General Questions :: Discussion


8.To scan a and b given below, which of the following scanf() statement will you use?
A.scanf("%f %f", &a, &b);
B.scanf("%Lf %Lf", &a, &b);
C.scanf("%f %Lf", &a, &b);
D.scanf("%f %lf", &a, &b);
Answer:  Option  D
Explanation:

To scan a float value, %f is used as format specifier.

To scan a double value, %lf is used as format specifier.

Therefore, the answer is scanf("%f %lf", &a, &b);

Tutorial Link:
Published by:Michael Daani

Comments are not available

Post your comments here:

Optional

Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers