Study codes given below and add your own codes so that the program is able to:
- count and display the number of vowels exist in the array
- replace all those alphabets after ‘q’ with the symbol ‘*’
- display the latest contents of the array
#include<iostream>
using namespace std;
int main()
{
char myArray[] = {'i', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i','o', 'n', 'a', 'l'};
//add your codes here
cout<<endl;
system("pause");
return 0;
}
1.Write a C++ program that accepts two 4X4 matrices, and calculates:
A.Sum of the matrices
B.Product of the matrices
Define your functions to do the tasks.
3.Write a C++ program that accepts sentence from the user, and counts total number of vowel or consonant, and displays the vowel and consonant sentence.
4.Write a C++ program that works exactly like strcat built-in function. It accepts two strings then it concatenates the second string to the first string. Define your function.
5.Write a C++ program that works exactly like strcnmp built-in function. It accepts two strings then it compares the two strings alphabetically considering number of characters to be compared, which is specified by the user. Define your function.
Write a code to return the following structure from function:
Structure name is Patientand haveTHE following members.
Name, cnic, sugar_level.
Write a funtion using C++ statements called getTotalPraduction() which takes two integer values (value1,value2) and returns the total value
write a c++ program to create a class called date that has separate member data for day month year one constructor should initialize
this data to 0 and another should initialize it to fixed values .another member function should display it The final member function
should compare two objects of type date passed as arguments. A main() program should create two initialized date objects(among these one
should contain today's date and another one should contain your date of birth) and one that isn’t initialized. Then it should compare
the two initialized values together, leaving the result in the third date variable. Finally it should display the value of this
third variable. Make appropriate member functions const.
write a c++ program to create a class called date that has separate member data for day month year one constructor should initialize
this data to 0 and another should initialize it to fixed values .another member function should display it The final member function
should compare two objects of type date passed as arguments. A main() program should create two initialized date objects(among these one
should contain today's date and another one should contain your date of birth) and one that isn’t initialized. Then it should compare
the two initialized values together, leaving the result in the third date variable. Finally it should display the value of this
third variable. Make appropriate member functions const.