+ 1
what is the difference between c and c++?
is the c and c++ is different? if it, how much?
5 Answers
+ 5
1. C++ is the upgradation of C.
2. C is POP based, C++ is OOP based.
3. C has less functions and keywords than C++
4. C uses structure to differentiate users to access same methods while C++ uses Class in place of structure.
+ 4
Increment and decrement are unary operators used in all programming languages. they have two variants- post and pre..
pre increment (++i) :
if we use pre increment operator with any variable (say i), it means the value in current variable is incremented on line where it is used.
post increment (i++):
if we use post increment operator with any variable (say i), it means the value in current variable is incremented after the line where it is used.
eg. In C++,
#include<iostream.h>
void main()
{
int i=5;
cout<<i; // print 5
cout<<++i; // print 6
cout<<i++; // print 6
cout<<i; // print 7 because above line works here
}
Same goes with pre decrement (--i) and post decrement (i--)
+ 4
@piyal,
I don't consider any language as the best of all..
Every language has its own advantages according to their need.
For making an operating system or highly graphic games, C and C++ is used.
Almost everywhere (especially in India), java is used for secure transaction sites like railway, airplanes, banking purpose.
C# is used for windows based applications.
PHP is server side programming language so it is used to handle server..
So, not one is best of all..
They just used according to the need of them..
+ 2
what is increment and decrement??
0
which language is best for programming?