Write one or more C++ statements that perform the following tasks: a) Define a constant integer variable
Question:
Write one or more C++ statements that perform the following tasks:
a) Define a constant integer variable NSize, initialized to m, where m is the length of your full name.Declare an array with NSize elements of type char, and initialize the elements with your
b) b) full name. C) d) e) f Print the first and the last elements of the array in (b).
c) Print all the array elements using a for hent.
d) Count and display how many vowels are in the array. Use the for and if statements.
e) Replace vowels in the array with 'S'. Print the array again.
f) Declare an array, initialize it with your student number.
g) Total up all numerals in the array declared in (9) using a while statement.
h) Sort the numerals in the array declared in (g) in descending order.
i) Find any duplicates in the numerals. Replace the duplicates with alphabet 'd'.