Is there something that we can do in C and not in C++?

Answer Posted / som

In C the const variables can be declared and can allocate
the value later.
For ex:
const int i;
i = 7;

This will work in c, but c++ will give compilation error.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which coding certification is best?

579


What is std namespace in c++?

728


Do class declarations end with a semicolon? Do class method definitions?

626


What are the uses of pointers?

586


How do you print a string on the printer?

586






What is lambda in c++?

582


When do we use copy constructors?

601


What is prototype in c++ with example?

571


What is the use of setfill in c++?

594


Are there any special rules about inlining?

589


What are the comments in c++?

578


Where and why do I have to put the "template" and "typename" keywords?

589


How does class accomplish data hiding in c++?

666


What is object in c++ example?

630


Tell me an example where stacks are useful?

602