Saturday 16 March 2013

int c= --2;


main()
   {
               int c= --2;
               printf("c=%d",c);
   }

it will generate an error LValue Required... Because -- operator can only be applied to variables as a decrement operator (eg., --i, i--). 2 is a constant and not a variable.



Blog Author: Vijay Kumar

Go to: Java Aptitude

No comments:

Post a Comment