Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume that name variable contains the full name of a person, with the following format: Lastname, Firstname or Lastname, Firstname MidleInitials. Which of the following
Assume that "name" variable contains the full name of a person, with the following format: "Lastname, Firstname" or "Lastname, Firstname MidleInitials". Which of the following expressions will assign a "newname" variable containing the same name, but with the format "Firstname Lastname" or "Firstname MiddleInitials Lastname"? eg the name "Sacan, Ahmet" should produce the newname "Ahmet Sacan" and the name "Sacan, Ahmet J should produce "Ahmet J Sacan". Assume that the comma character appears only once in the name variable.
There may be more than one correct answer. Select all correct answers.
newname strjoin fliplrstrsplitname
newname strjoin fliplrstripstrsplitname
I findname;
newname nameI:end name:I
I strfindname;
newname nameI:end name:I
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started