Re: A89: Clearing a string


[Prev][Next][Index][Thread]

Re: A89: Clearing a string




using this method, I'm assuming you don't know the length of the string, and 
that you want it filled with spaces.

num=0;
while(string[num]!="/0")
string[num++]=" ";

> What's the best way to clear a string in C.  I have tried several attempts
>  and failed.  Any help will be appreciated.



Follow-Ups: