Quote:
Originally Posted by lav.hit
if x=a+++++b ;
it will not give any error......
as a++ is preincremented value and ++b will be post increamented value......
suppose a=3;b=5;
then x will be 3+6=9....
|
hey, lav
x= a+++++b; It gives an error (Lvalue required in function main)
but
x= a++ + ++b; it works
example
#include
#include
int main()
{
int x,a=10,b=22;
clrscr();
x=a++ + ++b;
/* x=a+++++b; It gives error*/
printf("x=%d",x);
getch();
}
output:
x=33