Menu

Unic 1 Show Print Following Code First Input Enter 1 Hello World Without Quotation Marks S Q43889357

c++
UNIC 1. Show the print out of the following code when the first input (Enter 1) is Hello World without quotation marks andUNIC 1. Show the print out of the following code when the first input (“Enter 1”) is “Hello World without quotation marks and the second input (“Enter 2”) is the letter ‘el’) without quotation marks. (10 points) #include <iostream> #include <cstring> using namespace std; const int M=50; void y (char *s, char ch) char temp [M], *p; int i; ps; i=0; while (*p!=’ ‘) if (*p!=ch) temp[i]=*p; i++; else temp[i] = ‘X’; p++; temp[i]=’ ‘; strcpy(s, temp); int main() char str(M), let; cout<<“Enter 1:”; cin.getline (str,M); cout<<“Enter 2:”; cin>>let; y (str, let); cout<<str<<endl; return 0; Page 2 10 Show transcribed image text UNIC 1. Show the print out of the following code when the first input (“Enter 1”) is “Hello World without quotation marks and the second input (“Enter 2”) is the letter ‘el’) without quotation marks. (10 points) #include #include using namespace std; const int M=50; void y (char *s, char ch) char temp [M], *p; int i; ps; i=0; while (*p!=’ ‘) if (*p!=ch) temp[i]=*p; i++; else temp[i] = ‘X’; p++; temp[i]=’ ‘; strcpy(s, temp); int main() char str(M), let; cout

Expert Answer


Answer to UNIC 1. Show the print out of the following code when the first input (“Enter 1”) is “Hello World without quotation mark…

OR