Question: 1) Write a code fragment that will use the operator to concatenate two strings first name and lastname together with a space between them. The

 1) Write a code fragment that will use the operator to
concatenate two strings first name and lastname together with a space between

1) Write a code fragment that will use the operator to concatenate two strings first name and lastname together with a space between them. The strings are defined as follows: string name first name string first name wJohn string lastname nsmith (Note that the above is one way to initialize strings.) 2) Write a code fragment that will use the operator to append the string username to the string message and store it into the string buffer where the username is first bracketed by the strings and ".The strings are defined as follows: string user James string text Welcome to our Wareagle Chat Group string buffer; After executing your code fragment, message buffer must contain the following string: (*James*) Welcome to our Wareagle Chat Group 3) Write the code fragment that will use the above code in (2 to allow the program to prepend more user name and message into message buffer created in (2) string user2 Kate string text2 Hi there After executing your code fragment, buffer should contain the following string: (*Kate*) Hi there! Paul )Welcome to our Wareagle Chat Group 4) Write the code fragment that will use the above code in (3)to allow the program to In' character between two messages text 3 and text4 and stores them in buffer. string user3 Matt string text 3 War Eagle string text, 4 Hey! After executing your code fragment, buffer should contain the following string: (*Matt War Eagle !InHey (*Kate*) Hi there (*Paul*) Welcome to our Wareagle Chat Group Print out this string in buffer and describe what happens

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!