Logo 
Search:

C++ Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C++ ProgrammingRSS Feeds

Which of the following code would read a line of text from char type variable, book[20]?

  Shared By: Kyle Evans    Date: Jan 05    Category: C++ Programming    Views: 886

Answer:

Options

a) cin.getline(book,20);
b) cin.getline(book[20]);
c) cin.getln(book,20);
d) None of the above

Answer : a) cin.getline(book,20);

Share: 
 



Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: