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

Declare a class vehicle and make it an abstract data type.

539


How delete [] is different from delete?

602


What are the two types of polymorphism?

596


Which software is best for programming?

665


Write some differences between an external iterator and an internal iterator?

591






What do you mean by overhead in c++?

583


Can a program run without main in c++?

589


What is function declaration in c++ with example?

550


What are virtual constructors/destructors?

578


To which numbering system can the binary number 1101100100111100 be easily converted to?

608


Explain what are accessor methods?

673


What does the nocreate and noreplace flag ensure when they are used for opening a file?

682


What's the "software peter principleā€?

627


What is const pointer and const reference?

597


What are c++ stream classes?

562