Code 3: Technique to input a string and print only vowels.

Problem Description:
In this code we need to input a string. A string in C/C++ is a combination of characters. After we have stored the input string in a character array we need to compare each and every individual alphabet with the vowels present. Now we have to traverse through all character in a string whose range starts from 0 to length of s - 1. Similarly we will use a for loop Suppose are input string is in an array s[ ] now to get the individual alphabets we would use s[0]  - 1st Character, s[1] - 2nd Character and so on. Here s[0],s[1], ...behave as characters and not as string.


No comments:

Post a Comment