answersLogoWhite

0

#include<stdio.h>

main()

{

int i,words,spaces;

char a[30];

printf("enter the string") ;

scanf("%s",a);

for(i=0;a[0]!="\0";i++)

{

if (a[i]=' ')

spaces++;

}

printf("the no. of spaces in the string is %d",spaces);

printf("the number of words in the string is %d",spaces+1);

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the least count of chain?

The least count of a chain is the smallest measurement that can be accurately read or measured using that particular chain. It is typically determined by the number of links in the chain and the precision of the markings on it.


Explain how to check the ratios of a gearbox?

The input and output shafts need to be marked Then put in a particular gear Rotate the input shaft ten revolutions and count the output shaft revolutions. Or read the specs in the manual OR disassemble the trans and count the gear teeth.


What is the word count in the book Beezus and Ramona?

I read the book the word count is about 450


How do i read Aerobic plate count?

get a tutor


How do you flash the tbi computer on a 91 camaro?

You can not. If you are experiencing a particular problem you can check TSB's for an updated PROM. That is Program Read Only Memory. It would have to purchased through the dealer.


How many syllables has read?

it only has one stupid idiot.. can't you read or count??


What is the responsibility of TV news reader?

to read the particular news of a particular day


Where can one read about the Apollo space program?

There are a number of websites that allow one to read about the Apollo space program. Wikipedia has many details about the program and each of the missions.


How can you read a directory in a C program?

no


What program do you use to read txt file?

A .txt can be read with notepad.


What is the Read 180 program meant to accomplish?

The Read 180 program is a reading program to improve the reading and writing skills of students in grades 4 through 12. The program uses software and an iPad to accomplish this.


Are palindromes a regular occurrence in the English language?

Palindromes are words or phrases that read the same forwards and backwards. While they are not a regular occurrence in the English language, there are some common examples like &quot;racecar&quot; and &quot;madam.&quot;