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 can I use instead of namespace std?
Can you declare an array without a size in c++?
How do you remove an element from a set in c++?
why is c++ called oops? Explain
What is c++ code?
What do you mean by enumerated data type?
Should I learn c or c++ first?
What is nested class in c++?
Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h
How much do coding jobs pay?
Show the application of a dynamic array with the help of an example.
State the difference between pre and post increment/decrement operations.
What is object oriented programming (oop)?
Why do we need c++?
Do you know the problem with overriding functions?