Skip to content

Instantly share code, notes, and snippets.

@pasali
Created November 18, 2011 13:42
Show Gist options
  • Save pasali/1376492 to your computer and use it in GitHub Desktop.
Save pasali/1376492 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
int main(){
char dizi[] = " zaza dayi ";
char ek[110];
char *p = dizi;
int j=0 ;
while(*p != '\0'){
if (*p != ' '){
ek[j] = *p;
p++;
j++;
}
else{
ek[j] = *p;
while(*p == ' ')
p++;
j++;
}
}
printf("%s\n",ek);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment