Question Detail

What is getline() in c++

  • getline() extract the delimeter newline character from the input stream
  • getline() does not extract the delimeter newline character from the input stream
  • None of above
Similar Questions :

1. Constructor is

  • A class automatically called whenever a new object of this class is created
  • A class automatically called whenever a new object of this class is destroyed
  • A function automatically called whenever a new object of this class is created
  • A function automatically called whenever a new object of this class is destroyed

2. How to define a destructor

  • X~() {}
  • X() {}~
  • X() ~{}
  • ~X() {}

3. ios::ate is used for

  • Set the initial position at the start of the file
  • Set the last position at the end of the file
  • Set the initial position at the end of the file
  • Set the last position at the start of the file

4. Which operator is used to define a member of a class from outside the class definition

  • ->
  • ::
  • .
  • >>

5. Can #define accept parameters

  • Yes
  • No
Read more from - C++ Programming Questions Answers - Chapter 1