C Programming :: Input / Output - Discussion
Home > C Programming > Input / Output > MCQs Questions Discussion
4 / 6
Choose the correct option.
if i,j,k are integers, the scanf function to enter i,j,k such that i is decimal,j is octal and k is hexadecimal would be
Ascanf("%x %x %8x",i,j,k)
Bscanf("%d %o %x", i,j,k)
Cscanf("%d %o %x",&i, &j, &k)
Dscanf("%d %8d %16d", &i, &j, &k)
Answer: Option (Login/Signup)
Show Explanation
1. %d- to scan an integer value.
2. %o- to scan an octal value.
3. %x- to scan value in hexadecimal format.
Asked In ::
STEP-BY-STEP
Following are the format specifiers for the above cases-
1. %d- to scan an integer value.
2. %o- to scan an octal value.
3. %x- to scan value in hexadecimal format.
Read Full Answer
Report Error
Please Login First Click Here