by 11.u9p nuhg a text Due Sunday Available Jul 4 at 12am- Jul 15 at 11:59pm 12 d
ID: 3912698 • Letter: B
Question
by 11.u9p nuhg a text Due Sunday Available Jul 4 at 12am- Jul 15 at 11:59pm 12 days entry box Assignment 4 - External Procedures Create an external procedure call strCat that will concatenate one string to the end of another. I you are not familar with the word concatenate it simply means join one to the end of the other. F with the word concatenate it simply means jo string This is "a test" concatenation would yield one string This is a test For this assignment you are to create the strCat procedure in a separate asm file and call on it from your main.asm. This means you should be submitting two files. What I would like for you to do is paste your code into the submission text box the contents of one file on top of the other. Make sure you clearly mark where one file ends and the other begins. Parameters The parameters for the procedure should be a source string and a destination string. The source string being the string to copy characters from. The destination string being the string to copy characters to. In order for this to work your destination string must have enough room to fit all of the characters from both strings. In addition, you must pass the address of each string to the procedure using a stack frame. Make sure that you save and restore all registers that you are using. Failure to do so could lead to problems Commenting: You are required to comment every line of code you write. Failure to comment will force a grade reduction of 25% Testing 7/92018 From main you should take in two strings from the keyboard, pass the twos concatenated string when the procedure finishes Your program should look something like the following: Assignment 4 Extenal Procedures trings to strCat and print out theExplanation / Answer
// The Black Screen Isn't Clear But i understood that the task is to concatenate 2 strings where as i can help with it i ll write a program from where your strCat function is revoked. iam using c++ to do this.
#include <iostream>
#include <string>
using namespace std;
void strCat(string,string);
int main ()
{
string str1,str2;
cout << "enter 1st string: ";
getline (cin, str1);
cout<<"enter 2nd string: ";
getline (cin, str2);
strCat(str1,str2);
return 0;
}
void strCat(string str1,string str2)
{
cout<<str1<< " " <<str2;
}
// This is the simplest Solution To your problem
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.