what defference between c and c++ ?

Answer Posted / sunil s patil

Answer


c is not object oriented but c++ is object oriented


Actually c is a procedural programming language which
cann't face the real world problem. It has some drawback
like a global data is shared by all function and if in a
large program it is find out difficult that which function
uses which data.

On the other hand c++ is an object oriented programming
language which eliminate some pitfall of conventional or
procedural programming language. It is a concept or
approach for designing a new software. It is nothing to do
with any programming language although a programming
language which support the oops concept to make it easier
to implement.

This is the main different between c and c++.



in c we use scanf function as standard input function,while
in c++ we use streame cin>> for input.like this for output
in c we use printf function,while in c++ we use cout<< as a
output function.


in c we use #include<stdio.h>as iclusion file,while in c++
we use #include<iostreame>as inclusion file.


IN c-programe the main function could not return a value
but in the c++ the main function shuld return a value



A function can be declared in C as int fun();. This means
that fun()is a function without any argument or any number
of arguments.But in C++, this means that the function with
no argument at all.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a stream water?

658


What is a pointer variable in c language?

645


What is main () in c?

588


What is a structure member in c?

550


What is the difference between array and pointer?

569






Can 'this' pointer by used in the constructor?

614


Is exit(status) truly equivalent to returning the same status from main?

587


What are derived data types in c?

612


Write a program to reverse a linked list in c.

647


Do pointers need to be initialized?

562


What is the difference between int main and void main in c?

593


Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250

1509


Is it possible to initialize a variable at the time it was declared?

757


What is the general form of function in c?

610


What are the features of the c language?

648