Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #define N_MAX 1000
- main()
- {
- char s[]="testing this out and seeing how it goes";
- char s2[N_MAX][N_MAX];
- int n, i, j, k, m;
- n=strlen(s);
- j=0;
- for(i=0; i<s;i++)
- {
- if (s[i]==' '){
- j++;
- }
- else s2[j][i]=s[i];
- }
- for(k=0; k<n; k++){
- for(m=0; m<n; m++){
- printf("%c", s2[k][m]);
- }
- }
- system ("pause");
- }
Add Comment
Please, Sign In to add comment