Rearrange numbers in string
given a string, write a program to re-arrange all the numbers appearing on the string in decreasing order.
Note: There will not be any negative numbers or numbers with decimal part
Vowel Sound
Given a sentence, write a program rotate all the words left, so that every word starts with a vowel.
Note: If there is no vowel in the word, do not rotate it.
The input will be a single line containing a string.
The output should be a single line containing the modified sentence with rotated words.
For example, if the given string is "I saw a DRAGON flying in the sky", rotating each word towards left in this way "I aws a AGONDR and ingfly in eth sky", makes every word start with a vowel letter. The word "sky" is not rotated as it does not have any vowel in it. The words "I", "a", "and", "in" are not rotated as they already start with a vowel.
Sample Input
I saw a DRAGON flying in the sky
Sample Output
I aws a AGONDR ingfly in eth sky
Rearrange Numbers in String
Given a string, write a program to re-arrange all the numbers appearing in the string in decreasing order. Note: There will not be any negative numbers or numbers with decimal part.
The input will be a single line containing a string.
The output should be a single line containing the modified string with all the numbers in string re-ordered in decreasing order.
For example, if the given string is "I am 5 years and 11 months old", the numbers are 5, 11. Your code should print the sentence after re-ordering the numbers as "I am 11 years and 5 months old".
Sample Input
I am 5 years and 11 months old
Sample Output
I am 11 years and 5 months old
Write a program which has a function template for sorting an array of given data types
2. Create a class Student with following data members, name, roll, and marks as private data member. Create array of objects for three students, compare their marks but make sure allocating memory to all the objects during run time only and display the records of the student who is getting highest score.
Create an array of size 10 fill the array from the user. Then ask the user for the order of sorting ascending or descending. And sort the array using bubble sorting algorithm.
1. Create a class: “Question 1” with data members: 1D integer array of maximum size: 100, n (int). Create a dynamic constructor which takes input of n and n no. of array elements. Apart from taking input this class also displays the maximum and minimum elements from the given array elements.
1. Create a class: “Question 1” with data members: 1D integer array of maximum size: 100, n (int). Create a dynamic constructor which takes input of n and n no. of array elements. Apart from taking input this class also displays the maximum and minimum elements from the given array elements.
Write the class definition for a Date class that contains three integer data members: month, day and year. Include a default constructor that assigns the date 1/1/2000 to any new object that does not receive arguments. Also include a function that displays the Date object. Write a main() function in which you instantiate two Date objects – one that you create using the default constructor values, and one that you create using three arguments – and display its values.