write a piece of c++ code which allocate memory to the 50
object of type CObj

Answers were Sorted based on User's Feedback



write a piece of c++ code which allocate memory to the 50 object of type CObj ..

Answer / tara

CObj *obj = new CObj [50];

Is This Answer Correct ?    5 Yes 0 No

write a piece of c++ code which allocate memory to the 50 object of type CObj ..

Answer / santhosh k

#include<iostream.h>
class CObj
{
};
int main()
{
CObj **obj=new CObj *[50];
for(i=0;i<50;i++)
{
obj[i]=new Cobj[10];
}
}

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More STL Interview Questions

what is the difference between thread and process

1 Answers   Infosys,


HOW TO GET "H1B" -VISA 4 USA FOR MY SON?HE HAD COMPLETED "MS"(IT)FROM AUSTALIA 2007.I AM WORKING IN U.S.A.

0 Answers  


write a program that input four digit number and find how many 7 that number contains

4 Answers  


What are the different types of stl containers?

0 Answers  


What is the underlying datastructure of map?

5 Answers   BIA, Siemens,






Write a program in C++ returning starting locations of a substring using pointers

1 Answers  


please visit this site you'll find my question this is my homework please answer it if you can http://easyscience.org/ib/lofiversion/index.php/t36168.html

0 Answers  


What is Template Specialization?

1 Answers   Lucent,


What is a standard template library (stl)?

0 Answers  


Define the terms: field, record, table and database

5 Answers  


a program using one dimensional array that searches a number if it is found on the list of given input numbers given by the user and locate its exact location in the list.

0 Answers  


Is stl open source?

0 Answers  


Categories