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 base class?

0 Answers  


What is a binary file? List the merits and demerits of the binary file usagein C++.

0 Answers  


Badboy is defined who has ALL the following properties: 1. Does not have a girlfriend and is not married. 2. He is not more than 23 years old. 3. The middle name should be "Singh" 4. The last name should have more than 4 characters. 5. The character 'a' should appear in the last name at least two times. 6. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

1 Answers  


What are the 3 levels of programming languages?

0 Answers  


When is the copy constructor called?

0 Answers  






What is the meaning of string in c++?

0 Answers  


Why is c++ awesome?

0 Answers  


Can I learn c++ as my first language?

0 Answers  


C is to C++ as 1 is to a) What the heck b) 2 c) 10

0 Answers  


#include<iostream.h> void main() { class x { public: int func(int) { cout<<"cool"; return 1; } } }

1 Answers   Infosys,


Define a way other than using the keyword inline to make a function inline?

1 Answers  


Distinguish between new and malloc and delete and free().

0 Answers  


Categories