The following statement cin.getline(aString, 80): will read the whole line from the input. True/ False The answer is Tru

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

The following statement cin.getline(aString, 80): will read the whole line from the input. True/ False The answer is Tru

Post by answerhappygod »

The following statement
cin.getline(aString,80):
will read the whole line from the input.
True/ False
The answer is True, but I do not understand why. I am aware that(unlike cin) getline reads stuff like whitespaces, howeverdoesn't the "80" mean that it will only read up to a length of 80only and thus, not necessarily the whole line?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply