Question

4) What is the output if the input istom - Sawyer? #include <iostream> using namespace std; int main() { string playerName; c6) Manipulators are defined in the and libraries in namespace std. a. iostream; istream b. iomanip; iostream c. iomanip; ios8) Which statement will generate 3.140e+00 as the output? a. cout << setprecision(3) << scientific << 3.14; b. cout << setpre11) Which XXX (string stream) returnsHello John Denveras the output? #include <iostream> #include <sstream> #include <string>13) What is the output if the user enters10 20 30 40 50? #include <iostream> #include <sstream> #include <string> using names13) What is the output if the user enters10 20 30 40 50? #include <iostream> #include <sstream> #include <string> using names15) What is the output if myContact.txt file does not exist? #include <iostream> #include <fstream> using namespace std; int16) Which XXX is used to read and store the data into the variablenumberPlayersfrom the file that is opened by the stream inp18) Which XXX will search the input name in the GuestList.txt file? #include <iostream> #include <fstream> using namespace st

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

4.

1 #include <iostream> 2 3 using namespace std; 4 5 - int main() { string playerName;//initialize playername 7 cout<<Enter planswer:c

4) In the given Program the player name as Tom Sawyer. The cour Prints Swing Swing as Tom. before Beatuse, the string takes s

5 .

NM 1 #include <iostream> 2 3 using namespace std; 4 5 - int main() { 6 string name=Adam;//initialize string name 7 int age=option:a

Answer is 5. The Course nameca is za age age << years old.; The Syntan OR coy is you wyce What you want to Pring ze what

6.

а ale defined in in the Omanip and 6. Manipulators jos libraries in the namespace srde some manipulators of iomanin au seanswer:c

7.

1 #include <iostream> 2 #include<ios>//for setw() 3 #include<iomanip>//for setfill() 4 using namespace std; 5 6 - int main()answer:d

8.

1 #include <iostream> 2 #include<iomanip> 3 using namespace std; 4 5 - int main() { 6 cout<<setprecision(3)<<scientific<<3.14coutal sexprecision (3) <2 scientific 23.14; is a The Answer (8) sepprecision & Ir is used to sess the decimal Precision toanswer:a

9.

1 #include <iostream> 2 #include<ios> 3 #include<iomanip>//for setw and setfill 4 using namespace std; 5 6 - int main() { 7 canswer:b

As per HomeworkLib rules I did 5 questions . please post remaining questions as a new question.

Thank you.please give thumbs up.

If you have any queries please comment me.

Add a comment
Know the answer?
Add Answer to:
4) What is the output if the input istom - Sawyer? #include <iostream> using namespace std;...
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
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
ADVERTISEMENT