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

Explain container class.

690


What is the purpose of extern storage specifier?

631


What is static function? Explain with an example

562


Is c++ an integer?

579


Explain pass by value and pass by reference.

599






What are c++ variables?

542


Is atoi safe?

603


What are guid?

691


What is c++ hiding?

623


Evaluate !(1&&1||1&&0) a) Error b) False c) True

707


How a macro differs from a template?

640


What is fflush c++?

583


What is an adaptor class in c++?

608


Does there exist any other function which can be used to convert an integer or a float to a string?

655


Is rust better than c++?

607