what is the main difference between c and c++?
Answer Posted / raman sharma
in c is structual language and c++ is a object oriented
language. in c we use #include<stdio.h> and in c++ we use
#include<iostream.h>. in c we single line comment /* /* and
in c++ we use // //. in c we use manipulator and in c++ we
dont use manipulator because in c++ there is a one header
file we use #include<iomanip.h>. in c++ there is
class,object,encapsulation,inheritance,message
binding,polymorphism etc and in c there is no class and
object. in c++ we use endl in line break also \n but in c
programming there is only \n we use. there is constructor
and disgustor. in c++ is easy and less complexity program.
in c there is use printf() for output and scanf()for input
and c++ there is cout<< for output and cin>> for input and
<< is insertion and >> is a extraction this is main
differece between in c and c++
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do you use inheritance in unity?
class type to basic type conversion
How do you define a class in oop?
What is encapsulation in ict?
What does sksksk mean in text slang?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
What is the importance of oop?
to find out the minimum of two integer number of two different classes using friend function
What are the two different types of polymorphism?
What are the three main types of variables?
What exactly is polymorphism?
What is a class and object?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
What is a class oop?
What is an example of genetic polymorphism?