how can i use sorting (like quick sort) to sort a string like 'I am a boy' to 'a am boy I'??
Type: Posts; User: maniel
how can i use sorting (like quick sort) to sort a string like 'I am a boy' to 'a am boy I'??
thx!but can i do it in another way.
i have tried one like this
#define maxsize 80
#include <stdio.h>
int main()
{
int i;
char input[maxsize];
thx.but can i base on this stupid program to have a 2d array and break the string into words?
#include <stdio.h>
int main()
{
int i;
char input[80];
printf("Enter a string please:");
gets(input);
printf("The words are:\n");
for(i=0;...
also, if i dont use fgets, can i have another way to get the string?
i wanna ask what is stdin??
if i set the char array as a 2d array, how can i get the string from the user
i have tried to use 'gets', but when i compiled it, there is syntax error..
THx u very much
by the way
i am a beginner of c, many times find many difficulty in writing programs, how can i improve my programming skills?
sorry, i havent typed it down that the string is stored in the 2D array having a maximum 80 words....
after i get a string from the user, how can i break the string into words??
likes
the string" i am very happy today."
to
i
am
very
happy
today