1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
AnnyKZ [126]
3 years ago
10

A String variable, fullName, contains a name in one of two formats:last name, first name (comma followed by a blank), orfirst na

me last name (single blank)Extract the first name into the String variable firstName and the last name into the String variable lastName. Assume the variables have been declared and fullName already initialized. You may also declare any other necessary variables.
Computers and Technology
1 answer:
Volgvan3 years ago
8 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   char fullname[30];

   string fname="",lname="";

   int i,j;

   cout<<"Enter fullname\n";

   cin.getline(fullname,30); //so that blank can be read

   for(i=0;fullname[i]!=' ';i++)

       fname+=fullname[i];   //fistname will be saved

      cout<<"\n";

   for(j=i;fullname[j]!='\0';j++)

       lname+=fullname[j];    //lastname will be saved

   cout<<"\nFirstname : "<<fname<<"\nLastname : "<<lname;

   return 0;

}

OUTPUT :

Enter fullname

John thomson

Firstname : John

Lastname : thomson

Explanation:

cin.getline() should be used instead of cin in case of strings so that space can be read otherwise after blank string will be ignored.

You might be interested in
You have a server with two physical processors, each with four cores for a total of 8 cores. How many license packs must you buy
mafiozo [28]

Answer:

You must buy eight 2-core license packs, for a total of 16 core licenses.

Explanation:

Brainliest pls

3 0
3 years ago
material systems developer typically combines the skills of a programmer with the multitasking expectations of a .
SpyIntel [72]

Explanation:

Material systems developer typically combines the skills of a programmer with the multitasking expectations of developing 3 dimensional models of objects, enhancing the graphical effects.

The programmer simply does not have to translate the image but he needs to map the objects in some different ways that give it a 3D look. The object is composed of from material instead of simple modeling

8 0
3 years ago
When a router fails to send messages in a timely fashion, this is a problem of the _____.
natima [27]
<span>network layer  

hope it helped</span>
4 0
3 years ago
Bob's Assembly is a hardware manufacturer. It specializes in builders' hardware for doors, cabinets, windows, and bathrooms. Bob
Snezhnost [94]

Answer:

distinctive competence

Explanation:

The distinctive competence denotes the various characteristic of certain business on which behalf that business perform better than its competitors. And since the business succeeds in doing those things better than its competitors, that business gains a competitive advantage over its competitors. And here, Bob's assembly is a hardware manufacturer for the doors, cabinets, windows and the bathrooms. And his assembly products are more durable and economical than its competitor's products. And thus Bob has a competitive advantage over its competitors.

3 0
4 years ago
How do you enlarge an image to see more detail on it? (1 point)
ra1l [238]

Answer:

Open your image in Photoshop.

Go to the Image Size dialog, check resample, and select "Preserve Details" in the corresponding dropdown menu.

Make sure the Resolution is set to 300 Pixels/Inch.

Set Width and Height to inches and adjust to enlarge your image.

8 0
2 years ago
Read 2 more answers
Other questions:
  • Which is most likely to cause confusion, hinder thinking, and prevent quick access to resources in a study environment? phones c
    5·2 answers
  • Taylor has spent a lot of time developing and setting up his presentation. He wants to make sure his delivery is as good as poss
    8·2 answers
  • Which utility would you use to return the common name of the computer you're at? Execute this command and submit screen shots.
    11·1 answer
  • Meaning of page break​
    8·1 answer
  • Which pair of features is relevant when buying a pc?
    9·2 answers
  • Suppose that the domestic production of computer games creates enjoyment for those who play the games. Domestic production of co
    14·1 answer
  • In which circumstances would the view side by side feature be useful or helpful.
    15·2 answers
  • write a program in C# that reads a set of integers and then finds and prints the sum of the even and odd integers?​
    12·1 answer
  • You are creating a program that can add up the amount of money the user spent that day. Right down to the penny! What kind of va
    12·2 answers
  • Since data-flow diagrams concentrate on the movement of data between processes, these diagrams are often referred to as: A. flow
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!