#include <stdio.h>
void main()
{
char s[1000];
int count = 0,i = 0;
printf("Enter a sentence\n");
scanf("%[^\n]s", s);
while (i < s[i])
{
if (s[i] != ' ')
{
s[count] = s[i];
count++;
}
i++;
}
printf("Length of semtence excluding space is %d",
I want to print the number of character in sentence excluding space
And using while loop and without using #include<string.h>
What should i do further to print the number of character?
Use fgets(var, size, stdin) at scanf
Otumian
Anonymous
klimi
🐰🐾 سمیه
detergentTikiya
Anouck
Artöm
BrainChild
Zorrito
professor