a very simple problem : suppose a user gives an input n i take that input in an array say st1[100]
suppose the user gives input and stored in st1[100] as " To err is human. But its no excuse for our casual behaviour."
now it can be clearly seen here that there are two spaces(' ') before "To err...." similarly there are two spaces between "is(' ')(' ')human..." Even after '.' and before "But its..." there are 3 spaces which user entered during providing input.
now what i need is that when this input gets stored into the array st1[] then it shud be stored like dis :
st1[] : T o e r r i s h u m a n . B u t t h i s i s
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
n likewise.... i mean xactly one space between words irrespective how many spaces user enter due to negligence an also exactly one space after punctuation mark ('.').
assistance appreciated...



LinkBack URL
About LinkBacks


