string somestring ;
Which of the following choices will convert a standard C++
string object "somestring" to a C string?
a) Copy.somestring () ;
b) somestring.c_str ()
c) &somestring [1]
d) std::cstring (somestring)
e) (char *) somestring

Answer Posted / guest

'B' is the answer

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by inheritance in c++? Explain its types.

705


What are the differences between malloc() and calloc()?

709


What is a block in c++?

644


Is c# written in c++?

620


what are the iterator and generic algorithms.

1556






What are the various arithmetic operators in c++?

667


To what does “event-driven” refer?

708


Is there structure in c++?

679


Why c++ is the best language?

686


What is purpose of abstract class?

657


What is the difference between the parameter to a template and the parameter to a function?

746


what you know about c++?

759


Why do we learn c++?

622


What are the types of container classes?

706


What is a hashmap c++?

650