#include<stdio.h> char * func(char *s) { int i,j = 0; for(i = 0; i < strlen(s);) { if(s[i] == ' ') { i++; } else { s[j] = s[i]; j++; i++; } } s[j] = '\0'; return s; }
int main() { char s[300]; gets(s); printf("%s",func(s)); return 0; } On Sun, Oct 16, 2011 at 10:10 AM, sravanreddy001 <sravanreddy...@gmail.com>wrote: > This is doing a leftshift equivalent right? > its asked if there is another solution.. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/algogeeks/-/vc7DL3vWVy8J. > > 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. > -- *UTKARSH SRIVASTAV CSE-3 B-Tech 3rd Year @MNNIT 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.