ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories >> Code-Snippets >> Programming-Code >> C-Code
 
 
 
Question
You are given any character string. Find the number of sets
of vowels that come in the order of aeiou in the given
string. For eg., let the given string be DIPLOMATIC. The
answer returned must be "The number of sets is 2" and "The
sets are "IO and AI". Vowels that form a singleton set must
be neglected. Try to post the program executable in gcc or
g++ or in java.
 Question Submitted By :: Vadivel152
I also faced this Question!!     Rank Answer Posted By  
 
Answer
str="DIPLOMATIC"
str=lcase(str)
strlen=len(str)

vowelcnt=0

For  pos=1 to strlen
	charofstr=mid(str,pos,1)
	If (charofstr="a") or (charofstr="e") or (charofstr="i") or
(charofstr="o") or (charofstr="u")  Then
		vowelcnt=vowelcnt+1
	End If
Next
  
msgbox "no of vowels are:"& vowelcnt
 
0
Rohini
 
View All Answers
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com