I dont know why, but it prints just the first words.
Look what i made.
Expand|Select|Wrap|Line Numbers
- #include<stdio.h>
- #include<conio.h>
- int main()
- {
- char tab[50][255];
- int i, n, m;
- printf("\n Give the number of sentences : ");
- scanf("%d",&n);
- for(i=0; i<n; i++)
- {
- printf("\n Sentence %d : ", i+1);
- fflush(stdin);
- scanf("%s", tab[i]);
- }
- for(i=0; i<n; i++)
- {
- m = strlen(tab[i]);
- if(strlen(m > 20)
- {
- printf("\n Sentence %d : %s \n", i+1, tab[i]);
- fflush(stdin);
- }
- }
- }
Give the number of sentences : 3
First sentence : I like the website bytes.com
Second sentence : I like more the website bytes.com
Third sentence : bytes.com
After I compile the program it should print the first two sentences.
Thank you.