Which command properly allocates memory

a) char *a=new char[20];

b) char a=new char[20];

c) char a=new char(20.0);


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

What is a pure virtual function? Why is it represented as = 0...how is the internal implementation for the same

3 Answers   CTS,


write a program that takes 5 digit no and calculate 2 power that no and print it.

3 Answers  


What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random

0 Answers  


What happens when the extern "c" char func (char*,waste) executes?

0 Answers  


What is a literal in c++?

0 Answers  






What are the basics of local (auto) objects?

0 Answers  


What are inline functions? What is the syntax for defining an inline function?

0 Answers  


write a programming using for loop in c++ to generate diamond trangel?

1 Answers   NIIT,


Hi i need to Acess a variable "int Intval" in the below mentioned code .How to Access it guys i am waiting for your reply

3 Answers  


Why do we need constructors in c++?

0 Answers  


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.

2 Answers  


By using c++ with an example describe linked list?

0 Answers  


Categories