6. Suppose we call scanf as follows: [2 points] scanf("%f%d%f", &x, &i, &y); If the user enters 12.3 45.6 789 what are the values of x, i, and y after the call? (Assume that x and y are float variables, i is an int variable).
Added by Jake R.
Close
Step 1
The format string "%f%d%f" tells scanf to expect three inputs: a float, an int, and another float. Show more…
Show all steps
Your feedback will help us improve your experience
John Bell and 101 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
A program contains the following statement: if (2 != scanf("%d%f", &A, &B)) { printf("Bad input! "); return 2; } A. How many values are requested from the user? B. What type of values are expected? Save & Grade Save only
Madhur L.
7) write valid C code that will read in a single integer from stdin into the integer variable d, which has already been defined_ int d;
Florencia C.
Suppose x, y, and z are int variables and ch is a char variable. Consider the following input: 78 86 18 #42 & What value (if any) is assigned to x, y, z, and ch after each of the following statements executes? (Use the same input for each statement.) a. cin >> x >> y >> z >> ch; b. cin >> ch >> x >> y >> z; c. cin >> x; cin.get(ch); cin >> y >> z; d. cin >> x >> ch >> y >> z; e. cin.get(ch); cin >> x >> y >> z;
Akash M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD