I am writing a C program which a part of it needs to padding zero in front of a string. The program will get a sting from an ASCII file which the maxium length of this string is 5 char long. The string can sometimes less the 5 char long. In order to make it with the same length '0's are being pad in front ot the string.
e.g. if the string from the ASCII file is '123 ' then 2 '0's will be needed in front which will make it look like this '00123'
Can someone help me with that...... I am totally new to C programming. I think for someone with a little bit C language experience it should be quit strict forward, or is it.
Thanks
Vincent