How do you calculate the number of vowels and consonants in a string?

AnswerBot
1y
This question is about calculating the number of vowels and consonants in a string.
Iterate through each character in the string
Check if the character is a vowel or a consonant
Increment the respective ...read more
Anonymous
author
2y
Convert the string to lower case so that comparison can be reduced
Help your peers!
Add answer anonymously...
Mphasis Information Technology Specialist interview questions & answers
An Information Technology Specialist was asked Q. An anagram of a string is another string containing the same characters, but in ...read more
An Information Technology Specialist was asked Q. How do you determine if two given strings are anagrams of each other?
An Information Technology Specialist was asked Q. How do you reverse a string in Java?
Popular interview questions of Information Technology Specialist
An Information Technology Specialist was asked Q1. An anagram of a string is another string containing the same characters, but in ...read more
An Information Technology Specialist was asked Q2. How do you determine if two given strings are anagrams of each other?
An Information Technology Specialist was asked Q3. How do you reverse a string in Java?
>
Mphasis Information Technology Specialist Interview Questions
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

