76 297
Assignments Done
Successfully Done
In May 2019

Answer to Question #20155 in C++ for Jenn

Question #20155
Write a function that takes the first name and last name of a student and returns his/her full name. Write main to test the function.
Sample Input / output:
Enter your first name : Andre
Enter your last name : Wolf
Your full name is Andre Wolf.

I know that if I have that, I would use a prinft() statement and then use a scanf() statement to complete the whole code but I guess it wasn't right. Any tips?
Expert's answer
#include <iostream>
using namespace std;

char fname[100], lname[100];

void main(){
cout<<"Enter your first name : ";
cout<<"Enter your last name : ";
cout<<"Your full name is "<<fname<<" "<<lname<<".\n";

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions