Answer Posted / harsh
the difference between malloc and new is just that when a
variable is declared using malloc, it requires type casting
while new operator whenever used does not type cast by
itself as there is no need for the variable to be typecasted
when used with new operator
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
What are oops functions?
Get me an image implementation program.
#include
Can bst contain duplicates?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
What does I oop mean?
What is stream in oop?
What is abstraction in oop with example?
What language is oop?
What is the example of polymorphism?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What is an example of genetic polymorphism?
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box