what is the behaviour of C and C++ compiler for the below
statements.
int *p;
p = malloc(100);

Is the behaviour same ? or different ?

Answer Posted / venu

we should explicitly typecast. Otherwise it is give a
compilation error.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What jobs can you get with a c++ certification?

678


What is the arrow operator in c++?

643


What are the implicit member functions of class?

692


Explain differences between new() and delete()?

702


When is the copy constructor called?

730






When does the c++ compiler create temporary variables?

665


How would perform Pattern Matching in C++?

792


What is const pointer and const reference?

703


What is general format for a prototype?

690


What is implicit pointer in c++?

701


what are Operators and explain with an example?

828


Describe linked list using C++ with an example.

748


Define a conversion constructor?

710


What does floor mean in c++?

673


When there is a global variable and local variable with the same name, how will you access the global variable?

728