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
If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3
Why are pointers not used in c++?
What do you mean by delegate? Can a user retain delegates?
What is the syntax for a for loop?
What does iomanip mean in c++?
Explain what are single and multiple inheritances in c++?
What is purpose of new operator?
What are the different types of polymorphism in c++?
Is atoi safe?
What do the keywords volatile and mean mutable?
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
Can you please explain the difference between using macro and inline functions?
What is lvalue?
What are static variables?