1. Which header file is used to manipulate the string?a) iostream
b) iomanip
c) string
d) container
b) iomanip
c) string
d) container
2. How many maximum number of parameters does a string constructor can take?a) 1
b) 2
c) 3
d) 4
b) 2
c) 3
d) 4
3. Which constant member functions does not modify the string?a) bool empty()
b) assign
c) append
d) None of the mentioned
b) assign
c) append
d) None of the mentioned
4. What is the output of this program?
a) I like to code in c
b) I like to code
c) I like to code in c++
d) None of the mentioned
b) I like to code
c) I like to code in c++
d) None of the mentioned
5. What is the output of this program?
a) 9
b) 10
c) 11
d) 12
b) 10
c) 11
d) 12
6. What is the output of this program?
a) apple
b) 12
c) 23
d) Steve jobs founded the
b) 12
c) 23
d) Steve jobs founded the
7. What is the output of this program?
a) Steve
b) jobs
c) St*v* j*bs
d) St*v*
b) jobs
c) St*v* j*bs
d) St*v*
8. What is the output of this program?
a) Steve jo
b) Steve jobs
c) Steve
jobs
d) None of the mentioned
b) Steve jobs
c) Steve
jobs
d) None of the mentioned
9. What is the difference between unsigned int length() and unsigned int size()?a) Returns a different value
b) They are same
c) Both a & b
d) None of the mentioned
b) They are same
c) Both a & b
d) None of the mentioned
10. How many parameters does a resize method can take?a) 1
b) 2
c) 3
d) 4
b) 2
c) 3
d) 4
No comments:
Post a Comment