63.6k views
0 votes
Which of the variables will be read in values from the user input string 10 , 3.14,5? int

a, c; float b; scanf("%d,%f,%d", &a, &b, &c);
a. Only a
b. None of them
c. a, b, and c
d. a and c e. a and b

1 Answer

5 votes

Final answer:

Variables a, b, and c will read in the integer '10', floating-point '3.14', and integer '5' respectively, from the user input string using the scanf function in C.

Step-by-step explanation:

The student's question is about variable input using the C programming language scanf function. When presented with the user input string '10 , 3.14,5', and using the scanf format specifiers "%d,%f,%d", variable a will read the integer value '10', variable b will read the floating-point value '3.14', and variable c will read the integer value '5'. Thus, the answer is that variables a, b, and c will all be read in values from the user input.

User Jackie
by
7.4k points