<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: To count the number of words in a given string	</title>
	<atom:link href="https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Thu, 18 Dec 2014 05:54:56 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>
		By: koushik		</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/comment-page-1/#comment-61428</link>

		<dc:creator><![CDATA[koushik]]></dc:creator>
		<pubDate>Thu, 18 Dec 2014 05:54:56 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=376#comment-61428</guid>

					<description><![CDATA[if input is   &quot;       &quot; (only space) it is showing as output = 1, but it will 0. waiting for your reply with your help. thanks.]]></description>
			<content:encoded><![CDATA[<p>if input is   &#8221;       &#8221; (only space) it is showing as output = 1, but it will 0. waiting for your reply with your help. thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: pirate party collar		</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/comment-page-1/#comment-39982</link>

		<dc:creator><![CDATA[pirate party collar]]></dc:creator>
		<pubDate>Tue, 21 Oct 2014 08:56:48 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=376#comment-39982</guid>

					<description><![CDATA[You ought to take part in a contest for one 
of the greatest websites online. I will recommend this blog!]]></description>
			<content:encoded><![CDATA[<p>You ought to take part in a contest for one<br />
of the greatest websites online. I will recommend this blog!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: shohan		</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/comment-page-1/#comment-27128</link>

		<dc:creator><![CDATA[shohan]]></dc:creator>
		<pubDate>Thu, 18 Sep 2014 16:46:42 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=376#comment-27128</guid>

					<description><![CDATA[your code give a lot of error]]></description>
			<content:encoded><![CDATA[<p>your code give a lot of error</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ranjith		</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/comment-page-1/#comment-10012</link>

		<dc:creator><![CDATA[ranjith]]></dc:creator>
		<pubDate>Tue, 13 Aug 2013 09:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=376#comment-10012</guid>

					<description><![CDATA[it was wrong code and i have the easiest code created by me....:)]]></description>
			<content:encoded><![CDATA[<p>it was wrong code and i have the easiest code created by me&#8230;.:)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: sathish		</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/comment-page-1/#comment-10011</link>

		<dc:creator><![CDATA[sathish]]></dc:creator>
		<pubDate>Tue, 13 Aug 2013 09:12:01 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=376#comment-10011</guid>

					<description><![CDATA[wrong code....]]></description>
			<content:encoded><![CDATA[<p>wrong code&#8230;.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: AYYA SURESH		</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/comment-page-1/#comment-9857</link>

		<dc:creator><![CDATA[AYYA SURESH]]></dc:creator>
		<pubDate>Fri, 28 Jun 2013 14:12:51 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=376#comment-9857</guid>

					<description><![CDATA[in above program i place spaces betweeen evry word like nearly 5 spaces between each word so i write like that above without spaces....pls understand perfectly ..!!!!]]></description>
			<content:encoded><![CDATA[<p>in above program i place spaces betweeen evry word like nearly 5 spaces between each word so i write like that above without spaces&#8230;.pls understand perfectly ..!!!!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: AYYA SURESH		</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/comment-page-1/#comment-9856</link>

		<dc:creator><![CDATA[AYYA SURESH]]></dc:creator>
		<pubDate>Fri, 28 Jun 2013 14:11:09 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=376#comment-9856</guid>

					<description><![CDATA[public class StringDemo {
    public static void main(String[] ar){
         String str=&quot;     HAI hEllO     HOw arE You  hai  bga jaja      abjblkds    jksdnsd    dnjd dndn iddwd dbdb cjb  &quot;;
         int count=0; 
         int a=0,e=0,i=0,o=0,u=0,b=0,c=0,d=0;
         System.out.println(str);
         //System.out.println(&quot;No. of Characters =&quot;+str.length());
         str=str.trim();
         //System.out.println(&quot;No. of Characters =&quot;+str.length());
         for(int j=0,k=1;j&#060;str.length();j++,k++){
            if(str.charAt(j)==&#039;a&#039;&#124;&#124;str.charAt(j)==&#039;A&#039;){
                a++;
                c++;
            }
                else if(str.charAt(j)==&#039;e&#039;&#124;&#124;str.charAt(j)==&#039;E&#039;){
                    e++;
                    c++;
                }
                  else if(str.charAt(j)==&#039;i&#039;&#124;&#124;str.charAt(j)==&#039;I&#039;){
                    i++;
                    c++;
                }  
                 else if(str.charAt(j)==&#039;o&#039;&#124;&#124;str.charAt(j)==&#039;O&#039;){
                    o++;
                    c++;
                }
                  else if(str.charAt(j)==&#039;u&#039;&#124;&#124;str.charAt(j)==&#039;U&#039;){
                    u++;
                    c++;
                }
                  else{
                    b++;
                  }
             if(str.charAt(j)==&#039; &#039;){
             count++;
             }
             if((str.charAt(k-1)!=&#039; &#039;&#038;&#038; k&#060;str.length())&#038;&#038; (str.charAt(k)==&#039; &#039;)){
              d++;
             
             }
          }  
         System.out.println(&#034;No. of Characters (without Spaces)=&#034;+(str.length()-count));
              System.out.println(&#034;No. of spaces: &#034;+count);
             // System.out.println(&#034;No. of Words: &#034;+(count+1));
              System.out.println(&#034;No. of Words: &#034;+(d+1));
              System.out.println(&#034;No. of consonants and Symbols(if any): &#034;+(b-count));
              System.out.println(&#034;No. of vowel&#039;s: &#034;+c);
              System.out.println(&#034;No. of &#039;a&#039;s: &#034;+a);
              System.out.println(&#034;No. of &#039;e&#039;s: &#034;+e);
              System.out.println(&#034;No. of &#039;i&#039;s: &#034;+i);
              System.out.println(&#034;No. of &#039;o&#039;s: &#034;+o);
              System.out.println(&#034;No. of &#039;u&#039;s: &#034;+u);
              
             
    }
}


OUTPUT :
     HAI hEllO     HOw arE You  hai  bga jaja      abjblkds    jksdnsd    dnjd dndn iddwd dbdb cjb  
No. of Characters (without Spaces)=62
No. of spaces: 31
No. of Words: 15
No. of consonants and Symbols(if any): 46
No. of vowel&#039;s: 16
No. of &#039;a&#039;s: 7
No. of &#039;e&#039;s: 2
No. of &#039;i&#039;s: 3
No. of &#039;o&#039;s: 3
No. of &#039;u&#039;s: 1]]></description>
			<content:encoded><![CDATA[<p>public class StringDemo {<br />
    public static void main(String[] ar){<br />
         String str=&#8221;     HAI hEllO     HOw arE You  hai  bga jaja      abjblkds    jksdnsd    dnjd dndn iddwd dbdb cjb  &#8220;;<br />
         int count=0;<br />
         int a=0,e=0,i=0,o=0,u=0,b=0,c=0,d=0;<br />
         System.out.println(str);<br />
         //System.out.println(&#8220;No. of Characters =&#8221;+str.length());<br />
         str=str.trim();<br />
         //System.out.println(&#8220;No. of Characters =&#8221;+str.length());<br />
         for(int j=0,k=1;j&lt;str.length();j++,k++){<br />
            if(str.charAt(j)==&#039;a&#039;||str.charAt(j)==&#039;A&#039;){<br />
                a++;<br />
                c++;<br />
            }<br />
                else if(str.charAt(j)==&#039;e&#039;||str.charAt(j)==&#039;E&#039;){<br />
                    e++;<br />
                    c++;<br />
                }<br />
                  else if(str.charAt(j)==&#039;i&#039;||str.charAt(j)==&#039;I&#039;){<br />
                    i++;<br />
                    c++;<br />
                }<br />
                 else if(str.charAt(j)==&#039;o&#039;||str.charAt(j)==&#039;O&#039;){<br />
                    o++;<br />
                    c++;<br />
                }<br />
                  else if(str.charAt(j)==&#039;u&#039;||str.charAt(j)==&#039;U&#039;){<br />
                    u++;<br />
                    c++;<br />
                }<br />
                  else{<br />
                    b++;<br />
                  }<br />
             if(str.charAt(j)==&#039; &#039;){<br />
             count++;<br />
             }<br />
             if((str.charAt(k-1)!=&#039; &#039;&amp;&amp; k&lt;str.length())&amp;&amp; (str.charAt(k)==&#039; &#039;)){<br />
              d++;</p>
<p>             }<br />
          }<br />
         System.out.println(&quot;No. of Characters (without Spaces)=&quot;+(str.length()-count));<br />
              System.out.println(&quot;No. of spaces: &quot;+count);<br />
             // System.out.println(&quot;No. of Words: &quot;+(count+1));<br />
              System.out.println(&quot;No. of Words: &quot;+(d+1));<br />
              System.out.println(&quot;No. of consonants and Symbols(if any): &quot;+(b-count));<br />
              System.out.println(&quot;No. of vowel&#039;s: &quot;+c);<br />
              System.out.println(&quot;No. of &#039;a&#039;s: &quot;+a);<br />
              System.out.println(&quot;No. of &#039;e&#039;s: &quot;+e);<br />
              System.out.println(&quot;No. of &#039;i&#039;s: &quot;+i);<br />
              System.out.println(&quot;No. of &#039;o&#039;s: &quot;+o);<br />
              System.out.println(&quot;No. of &#039;u&#039;s: &quot;+u);</p>
<p>    }<br />
}</p>
<p>OUTPUT :<br />
     HAI hEllO     HOw arE You  hai  bga jaja      abjblkds    jksdnsd    dnjd dndn iddwd dbdb cjb<br />
No. of Characters (without Spaces)=62<br />
No. of spaces: 31<br />
No. of Words: 15<br />
No. of consonants and Symbols(if any): 46<br />
No. of vowel&#039;s: 16<br />
No. of &#039;a&#039;s: 7<br />
No. of &#039;e&#039;s: 2<br />
No. of &#039;i&#039;s: 3<br />
No. of &#039;o&#039;s: 3<br />
No. of &#039;u&#039;s: 1</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Joel		</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/comment-page-1/#comment-9568</link>

		<dc:creator><![CDATA[Joel]]></dc:creator>
		<pubDate>Sun, 03 Mar 2013 14:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=376#comment-9568</guid>

					<description><![CDATA[Why are you writing
if ( ( str[i] == ‘ ‘ &#038;&#038; str[i+1] != ‘ ‘ ) &#124;&#124; i == len ) 
PLEASE Explain.........]]></description>
			<content:encoded><![CDATA[<p>Why are you writing<br />
if ( ( str[i] == ‘ ‘ &amp;&amp; str[i+1] != ‘ ‘ ) || i == len )<br />
PLEASE Explain&#8230;&#8230;&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: mayuri		</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/comment-page-1/#comment-9027</link>

		<dc:creator><![CDATA[mayuri]]></dc:creator>
		<pubDate>Fri, 05 Oct 2012 13:22:09 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=376#comment-9027</guid>

					<description><![CDATA[u r adding unnecessary lines in d program which r not needed]]></description>
			<content:encoded><![CDATA[<p>u r adding unnecessary lines in d program which r not needed</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: om prakash		</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/string/to-count-the-number-of-words-in-a-given-string/comment-page-1/#comment-1611</link>

		<dc:creator><![CDATA[om prakash]]></dc:creator>
		<pubDate>Fri, 02 Apr 2010 18:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=376#comment-1611</guid>

					<description><![CDATA[Thax dear your code is totally correct]]></description>
			<content:encoded><![CDATA[<p>Thax dear your code is totally correct</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
