ankit.........
flag ko wapis 0 kaun karega?
pehle code ko run karke check karna chahiye na.. !!!!!

mean multiple spaces jaruri nahi ki ek hi baar ho :P

On Fri, Aug 12, 2011 at 4:05 PM, ankit sambyal <ankitsamb...@gmail.com>wrote:

> void delExtraSpaces (char *Str)
> {
> int Pntr = 0;
> int Dest = 0;
>  int flag=0;
> while (Str [Pntr])
> {
> if (Str [Pntr] != ' ')
> {
>       Str [Dest++] = Str [Pntr];
>       flag=0;
> }
> else if(Str[Ptr]==' '  && flag==1)
>          Str [Dest++] = Str [Pntr];
> else
>          flag=1;
> Pntr++;
> }
>
> Str [Pntr] = '/0';
> }
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
**Regards
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to