what is the main difference between c and c++?

Answer Posted / md.mohibullah

1.In c++,I/O is performed using I/O operators instead of I/O
functions.
2.In c,when a function takes no parameters,its prototype has
the word void inside its function parameter list.But,in
c++,the void is optional.
for instance,char f1(void)[in c]
char f1()[in c++]

3.In c++,local variables can be declared anywhere but in
c,local variables can be declared only at the start of a block.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is oop useful?

602


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1460


Why do we need oop?

671


Why is object oriented programming so hard?

616


What are the two different types of polymorphism?

672






What are the components of marker interface?

602


Is react oop?

611


What is this pointer in oop?

557


What is encapsulation with real life example?

572


What does I oop mean?

618


What is the difference between a constructor and a destructor?

615


Write a c++ program to display pass and fail for three student using static member function

2818


What is overloading in oop?

577


What does <> mean pseudocode?

624


Why we use classes in oop?

584