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

You're given an array containing both positive and negative integers and required to find the sub-array with the largest sum (O(N) a la KBL). Write a routine in C for the above.

4 Answers  


What does iomanip mean in c++?

0 Answers  


You want to link a c++ program to c functions. How would you do it?

0 Answers  


What are the benefits of c++?

0 Answers  


What do nonglobal variables default to a) auto b) register c) static

0 Answers  






Explain how would you handle a situation where you cannot call the destructor of a local explicitly?

0 Answers  


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

0 Answers   TCS,


What does std mean in c++?

0 Answers  


How do I write a c++ program?

0 Answers  


Why is c++ awesome?

0 Answers  


What are the new features that iso/ansi c++ has added to original c++ specifications?

0 Answers  


What does ios :: app do in c++?

0 Answers  


Categories