Question

Can someone help with this multiple choice question for C++ Suppose that x and y are...

Can someone help with this multiple choice question for C++

Suppose that x and y are int variables, z is a double variable, and the input is:

28 32.6 12

Choose the values of x, y, and z after the following statement executes:

cin >> x >> y >> z;

a.

x = 28, y = 12, z = 32.6

b.

x = 28, y = 12, z = 0.6

c.

x = 28, y = 32, z = 12.0

d.

x = 28, y = 32, z = 0.6

0 0
Add a comment Improve this question Transcribed image text
Answer #1

the output will be d that is x = 28, y = 32, z = 0.6

because here the compiler will take th einput values as three inputs they are int int and double

so when we enter 28 then it take one integer

next when we enter 32.6 here it will 32 as one integer and .6 as double value

Add a comment
Know the answer?
Add Answer to:
Can someone help with this multiple choice question for C++ Suppose that x and y are...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Write a C++ statement that uses the manipulator setfill to output a line containing 35...

    1. Write a C++ statement that uses the manipulator setfill to output a line containing 35 stars, as in the following line: *********************************** 2. Suppose that x and y are int variables, z is a double variable, and ch is a char variable. Supposed the input statement is: cin >>x >>y >>ch >>z; What values, if any are stored in x, y, z, and ch if the input is: 35 62.78 86 32A 92.6 12 .45A 32 3. Supposed x...

  • Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal...

    Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal '2', a string literal "2", and the numeric literal 2 are identical and stored the same way though they are different types. 3 Since comments do not affect the program execution, you don't need to have it at all. 4. After the following statements are executed, the value of the variable rem is 3. 1. A preprocessor directive line starts with a pound sign...

  • Consider the variables x, y and z where x and y are int variables initialized to...

    Consider the variables x, y and z where x and y are int variables initialized to 10 and 0 respectively, and z is a double variable initialized to 6.5 What values are stored in each variable after each statement executes? Keep in mind that the statements execute in sequence. x y z y = x++ + 5; z -= ++y * x--;

  • Suppose x, y, and z are int variables and w and t are double variables. What...

    Suppose x, y, and z are int variables and w and t are double variables. What value is assigned to each of these variables after the last statement executes? a) x = 17; b) y = 15; c) x = x + y / 4; d) z = x % 3 + 4; e) w = 17 / 3 + 6.5; f) t = x / 4.0 + 15 % 4 - 3.5;

  • can someone help me answer the following #Fsharp multiple choice questions along with explanations for each...

    can someone help me answer the following #Fsharp multiple choice questions along with explanations for each question please. 7. How does F# interpret the type int * bool -> string list? Select one: a. (int * (bool -> string)) list b. ((int * bool) -> string) list c. int * (bool -> (string list)) d. (int * bool) -> (string list) 8. Let F# function foo be defined as follows: let rec foo = function | (xs, []) -> xs...

  • Multiple Choice Multiple Choice Section 2.1 - 2.2 Introduction to Classes Here is the start of...

    Multiple Choice Multiple Choice Section 2.1 - 2.2 Introduction to Classes Here is the start of a class declaration: class foo { public: void x(foo f); void y(const foo f); void z(foo f) const; ... Which of the three member functions can alter the PRIVATE member variables of the foo object that activates the function? A. Only x can alter the private member variables of the object that activates the function. B. Only y can alter the private member variables...

  • If the following is a valid statement: w->x->y->z = 12;       then C) w, x and...

    If the following is a valid statement: w->x->y->z = 12;       then C) w, x and y are pointer variables. B) x, y and z are structure components. A) x, y and z are structure variables.A. x, y and z are structure variables. D) A and B statements are correct. E) B and C statements are correct. can someone explain this to me? C++ structures

  • Class: C++ Final Exam Dates Multiple Choice Identify the choice thar best completes the statement or...

    Class: C++ Final Exam Dates Multiple Choice Identify the choice thar best completes the statement or answer the question N 1. In s tructures, the computer repeats particular statements a certain number of times depending on some condition(s) a. looping C. selection b. branching d. sequence 2. What is the output of the following CH code? count = 1; num - 25; while (count < 25) numnum - 1: count++; cout << count << " " << num << endl;...

  • Multiple Choice Identify the choice that best completes the statement or answers the que 1. Which...

    Multiple Choice Identify the choice that best completes the statement or answers the que 1. Which of the following is a valid Java identifier? Spay b. 4myGrade! c. newGrade! d. 1dollar static final int EndVal-1: int double; int num console.nextInt(); while (num != Endval) double num * 2; System.out.println (double); num console.next1nt(); 2. The above code is an example of a(n)--while loop. a. flag-controlled b. counter-controlled c. EOF-controlled d. sentinel-controlled 3. The length of the string "first java program" is:...

  • C y Multiple Choice Question Consider the discrete random variables X and Y with the following...

    C y Multiple Choice Question Consider the discrete random variables X and Y with the following joint probability nass function: fxy(x, y) -1 0 1/8 0 -1 1/4 0 1/4 0 1/8 -1 1/8 1/8 What is P(X = 1 Y = 0)? Are X and Y independent? 1 1 1. 0; independent B. 1/2; independent C. 1/2; dependent D. 1/8; dependent E. none of the preceding

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT