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
Sunny_sXe [5.5K]
4 years ago
7

Write a program that has the following String variables: firstName, middleName, and lastName. Initialize these with your first,

middle, and last names. The program should also have the following char variables: firstInitial, middleInitial, and lastInitial. Store your first, middle, and last initials in these variables. The program should display the contents of these variables on the screen.
Computers and Technology
1 answer:
Licemer1 [7]4 years ago
3 0

Answer:

The programming language is not stated; However, I'll answer your question using C++ programming language.

Comments are used for explanatory purpose

Program starts here

#include<iostream>

#include <string>

using namespace std;

int main()

{

//Declare Variables

string firstName, middleName, lastName;

char firstInitial, middleInitial, lastInitial;

/*Initialize firstName, middleName and lastName (Replace values with your details)*/

firstName = "First Name";

middleName = "Middle Name";

lastName = "Last Name";

 

// Get Initials

firstInitial = firstName.at(0);

middleInitial = middleName.at(0);

lastInitial = lastName.at(0);

 

//Print Results

cout<<"Lastname: "<<lastName<<endl;

cout<<"Firstname: "<<firstName<<endl;

cout<<"Middlename: "<<middleName<<endl;

cout<<"Last Initial: "<<lastInitial<<endl;

cout<<"First Initial: "<<firstInitial<<endl;

cout<<"Middle Initial: "<<middleInitial<<endl;

return 0;

}

You might be interested in
FILL IN THE BLANK.
Veseljchak [2.6K]

Answer:

It is measured in megahertz (MHz) and gigahertz (GHz).

Hope this helps.

3 0
3 years ago
Your mom is trying to save room on her hard drive and wants to uninstall some of her applications. She asks you how to do this.
Olegator [25]
Press on an application, and press Ctrl and D together on a keyboard which means delete or unistall.
Is the answer supposed to be more specific?
3 0
3 years ago
Read 2 more answers
Python uses standard order of operations to evaluate equations. True False
Strike441 [17]

Answer:

False... Can you give me brainliest

Explanation:

6 0
3 years ago
Who was the inventor of the iPhone?
Over [174]

Steve Jobs and his team at Apple invented the iPhone.

6 0
3 years ago
Read 2 more answers
On a system with paging, a process cannot access memory that it does not own. Why? How could the operating system allow access t
kompoz [17]

Answer:

  • Because the page is not in its page table
  • The operating system could allow access to other memory by allowing entries for non-process memory to be added to the process page table

Explanation:

On a system with paging, a process cannot access memory that it does not own because the page is not in its page table also the operating system controls the contents of the table,therefore it limits a process of accessing to only the physical pages allocated to the process.

The operating system could allow access to other memory by allowing entries for non-process memory to be added to the process page table.that way two processes that needs to exchange  data can efficiently do that . i.e creating a very efficient inter-process communication

7 0
3 years ago
Other questions:
  • Please help i really need to turn this in already
    6·1 answer
  • ____________________ memory is the ability to add RAM without shutting down the computer or operating system.
    13·1 answer
  • I NEED HELP ASAP:
    8·1 answer
  • Which componet is the smallest unit in a spreadsheet
    15·1 answer
  • Write code that will copy the contents of the file into an array. You can assume that the file will only have 5 data values
    11·1 answer
  • How can you apply multimedia for study explain​
    11·1 answer
  • This assignment is based on Exercise 8.4 from your textbook. Each of the following Python functions is supposed to check whether
    11·1 answer
  • MmfbfMMMMMMMMMMMMMMMMMmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
    14·1 answer
  • Private notes about individual slides that you leave for yourself or for others who might use the presentation file is called __
    13·1 answer
  • Real life example of hexadecimal and octal decimal “for example in binary light switch”
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!