Write a function named “HasTheSameEndingChar” that accepts 2 parameters the same as command line arguments (argc and argv). It will return true if command line arguments that has the same ending character. If the user has provided no argument or only one argument, it will also return true. If any of the arguments does not end with same character, it will return false. This function should not have cin or cout. This function cannot use string class, either. Write a complete C++ program that accepts command line arguments and call the above function. It will print out “Yes” if the function returns true and “No” if it returns false. Important requirement: This program cannot include header file and cannot use string class and its methods such as “length” or “size” This program requires only the use of array, C-string and pointers No global variable is allowed to be declared and used For example, the following runs will print Yes, Yes, Yes, Yes, No, No, No and No. HasTheSameEndingChar HasTheSameEndingChar One HasTheSameEndingChar One Three HasTheSameEndingChar One Three Nine HasTheSameEndingChar One Two HasTheSameEndingChar One Three Two HasTheSameEndingChar One Two Three HasTheSameEndingChar One Three Nine Te
Write a function named “HasTheSameEndingChar” that accepts 2
parameters the same as command line arguments (argc and argv). It will return true if command line arguments that has the same ending character. If the user has provided no argument or only one argument, it will also return true. If any of the arguments does not end with same character, it will return false. This function should not have cin or cout. This function cannot use string class, either.
Write a complete C++
Important requirement:
This program cannot include header file and cannot use string class and its methods such as “length” or “size”
This program requires only the use of array, C-string and pointers
No global variable is allowed to be declared and used
For example, the following runs will print Yes, Yes, Yes, Yes, No, No, No
and No.
HasTheSameEndingChar
HasTheSameEndingChar One
HasTheSameEndingChar One Three
HasTheSameEndingChar One Three Nine
HasTheSameEndingChar One Two
HasTheSameEndingChar One Three Two
HasTheSameEndingChar One Two Three
HasTheSameEndingChar One Three Nine Ten
Actually, given information:
Important requirement:
This program cannot include header file and cannot use string class and its methods such as “length” or “size”
This program requires only the use of array, C-string and pointers
No global variable is allowed to be declared and used
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images