Currently browsing

June 2013

c-cpp

Assigning Values to An Array After Declaration

Once an array has been declared, it is good to know less tedious way of assigning values to its members than the following: iaMyArray[0]=8; iaMyArray[1]=3; iaMyArray[2]=4; iaMyArray[3]=0; iaMyArray[4]=0; iaMyArray[5]=1; iaMyArray[6]=8; iaMyArray[7]=8; You can initialize arrays on their declaration but when you want your array to be initialised differently according to …