Vidyalelo
C++ Programming · Q126

Introduction to C++

Programming · C++ Programming · question 126

Q126

What happens if the following line is executed in C and C++? 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
Answer
D.
Error in C and successful execution in C++

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board