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

Explain register storage specifier.

597


Can I uninstall microsoft c++ redistributable?

610


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?

669


Explain about Garbage Collector?

651


What is implicit pointer in c++?

604






Explain class invariant.

587


Can create new c++ operators?

575


What is the difference between the functions rand(), random(), srand() and randomize()?

729


Give an example of run-time polymorphism/virtual functions.

565


Should I learn c or c++ first?

568


Are c and c++ similar?

589


Does c++ have string data type?

691


Is C++ case sensitive a) False b) Depends on implementation c) True

616


Why main function is special in c++?

669


How do I download c++?

573