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
Describe new operator and delete operator?
What is == in programming?
How to declare an array of pointers to integer?
Write a program to calculate the following i want a c++program for this condition 1+4+9+16+….+100 Like this (1^2+2^2) Hint use function pow(a,b)
Is c++ map a hash table?
What does std :: flush do?
A milk carton can hold 3.78 litres of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one litre of milk is $0.38, and the profit of each carton of milk is $0.27. Write a C++ program that prompts the user to enter the total amount of milk produced in the morning. Then display the number of milk cartons needed to hold milk, the cost of producing milk, and the profit for producing milk.
What is a class template in c++?
Explain how would you handle a situation where you cannot call the destructor of a local explicitly?
Difference between pointer to constant and constant pointer to a constant. Give example.
Write about the use of the virtual destructor?
What are the weaknesses of C++?