www.thecareerplus.com
The CareerPlus
Home Technical Resources Programming Arrays and Pointers
Wednesday 08th September 2010
 
 
If a is an array, is a++ valid?

Discuss it!          

No

You will get an error like


Error message : Lvalue required in function main.


Doing a++ is asking the compiler to change the base address of the array. This the
only thing that the compiler remembers about an array once its declared and it wont
allow you to change the base address. If it allows, it would be unable to remember
the beginning of the array.

Discuss it!          

CrackTheIntervew.NET
Advertisement
 
Top! Top!