Is there something that we can do in C and not in C++?
Answer Posted / dangling pointer
try this one
int *x=malloc(10);
it works in c but not in c++ reason is we will have to
explicitly cast in c++ to convert a void* to another type
to work.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is the benefit of encapsulation?
What is friend class in c++ with example?
Which sort does c++ use?
How do you differentiate between overloading the prefix and postfix increments?
What is late binding c++?
Explain how a pointer to function can be declared in C++?
Define the operators that can be used with a pointer.
What is the use of namespace std in C++?
Describe exception handling concept with an example?
What is the best c++ ide?
What does std mean in c++?
What is a container class? What are the types of container classes in c++?
Will c++ be replaced?
How the virtual functions maintain the call up?
Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].