Knowee
Questions
Features
Study Tools

Write a C program to read a sentence through keyboard and to display the count ofwhite spaces in the given sentence.

Question

Write a C program to read a sentence through keyboard and to display the count ofwhite spaces in the given sentence.
🧐 Not the exact question you are looking for?Go ask a question

Solution 1

Sure, here is a simple C program that counts the number of white spaces in a given sentence:

#include <stdio.h>

int main() {
    char sentence[1000];
    int count = 0, i;

    printf("Enter a sentence: ");
    gets(sentence);

    for(i = 0; sentence[i] != '\0'; i++) {
        if(sentence[i]
    Knowee AI  is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI  is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI  is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI  is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI  is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI  

This problem has been solved

Similar Questions

Write a C program to read an English Alphabet through keyboard and display whetherthe given alphabet is in upper case or lower case.

Write a C program to read a sentence and replace lowercase characters with uppercase and vice versa.

Write a program to count number of words in a given string whose length is greater than 3.For example:Input Resultpython is easier than C3

Write a python program to count the number of palindrome strings that occurred in the given string.

Write a program to count a total number of lines and count thetotal number of lines starting with 'A', 'B', and 'C' from the fileMyFile.txt

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.