What happens if the following line is executed in C and C++?
int *p = malloc(10);
int *p = malloc(10);A. Error in both C and C++
B. Warning in both C and C++
C. Error in C++ and successful execution in C
D. Error in C and successful execution in C++
Answer: Option C
Related Questions on Introduction to C plus plus
What does the 'cin' object in C++ represent?
A. File output stream
B. File input stream
C. Standard output stream
D. Standard input stream

Join The Discussion