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
What is an arraylist c++?
What is the most powerful coding language?
Can I create my own functions in c++?
Define a nested class. Explain how it can be useful.
What is encapsulation in c++ with example?
Which should be more useful: the protected and public virtuals?
Write about the role of c++ in the tradeoff of safety vs. Usability?
What are the advantages of c++?
Is arr and &arr are same expression for an array?
What is a pointer how and when is it used?
How long will it take to learn programming?
What is a template in c++?
What is a class template?
Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work
Is c# written in c++?