11 years, 5 months ago.

clear an array

how can i clear this complet arry

char abc[10];

abc[1]=100

abc[2]=120

usw...

Is there a possibility to clear the char abc all the 10 sign???

Thanks for help

1 Answer

11 years, 5 months ago.

There are probably lots of ways to clear it. The approach I use is...

for (int i=0; i<10; i++){
abd[i] = 0;
}

Accepted Answer