what is the main difference between c and c++?
Answer Posted / jyotsna
C
c is a procedural programming language
in c we use printf function
in c we use scanf function as standard input
c-programe the main function could not return a value
in c we use #include<stdio.h>as inclusion file
c is a topdown approach
In C memory allocation is done with malloc statement
memory is
deallocated in C using free statement
In C DATA IS NOT SECURED
FOCUS ON PROCEDURES
PROGRAMS ARE DECOMPOSED
INTO FUNCTIONS
DOES NOT PROVIDE
DEFAULT ARGUMENTS
c is low level language
In C,DATA can be MOVE openly around in the system from
function to function
C is a collection of FUNCTIONS.
C++
c++ is object oriented
in c++ we use cout<< as a
output function.
in c++ we use streame cin>> for input
in the c++ the main function should return a value
In c++ we use #include<iostreame>as inclusion file.
c++ is bottom up approach
in C++ it is done through new keyword
in C++
deallocation takes place through delete.
In C DATA IS SECURED
FOCUS ON DATA
INTO OBJECTS
PROVIDES
c++ is sn high level language
In C++,DATA is HIDDEn.It can not be accessed by external
Functions
C++ is a collection of FUNCTIONS and/or CLASS.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
Is react oop?
What is object and example?
What is inheritance in oop?
What is the highest level of cohesion?
Explain the concepts involved in Object Oriented programming.
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
Why do we use encapsulation in oops?
What are the components of marker interface?
Why is polymorphism used?
write a program to find 2^n+1 ?
What is abstraction example?
Why is abstraction used?
Explain the advantages of inheritance.
Give two or more real cenario of virtual function and vertual object