We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
can i use the for loop like this in accessing the 2-d array.
for(u=0;u<=4;u++) { for(v=v1;;) { arr[u][v] += 1; } }
bcos in the second for loop i want to do the increment in some other function.
but the c51 shows an endless loop on executing the second for loop.
can i use only one for loop and no for loop for v since this v i want to increment in some other function?
"can i do the increment of the 'y' of arr[x][y] in another function?"
Of course you can!
I think you need to go back to your 'C' textbook, and thoroughly read the description of the 'for' loop, and precisely what the 3 expressions in the 'for' clause actually do...
for( w=0; x<y; z++ ) { : : }
is equivalent to
for( w=0; x<y; ) { : : z++; }
Thank you.
Since i made mistake in some other place it had affected the for loop.
Thats y i also confused.
Anyway thank you for ur message.