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
How much do c++ programmers make?
Explain rtti.
What is data types c++?
When is the destructor called?
What is std namespace in c++?
Are c and c++ similar?
How many static variables are created if you put one static member into a template class definition?
What is ctime c++?
What are the differences between java and c++?
What are the classes in c++?
When can I use a forward declaration?
Differentiate between structure and class in c++.
How come you find out if a linked-list is a cycle or not?
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
Explain how functions are classified in C++ ?