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
vfiekz [6]
1 year ago
5

Implement one array of the English alphabet (26 characters). a) Create a function, getLetters() to cast and generate the array.

b) Create a function, printLetters() to output the array. c) Create a function, swap() for swapping character variables. d) Create a function, reverseLetters() uses a loop and the swap() to reverse all array elements. e) Call printLetters()to Output the updated array. Hint: Set a variable for the first and last indices. Swap those values. Gradually move the first/last pointers to the middle of the array, swapping as you go. When the middle is reached, the array will be reversed.
Computers and Technology
1 answer:
WARRIOR [948]1 year ago
6 0

#include <fstream>

#include <iostream>

#include <iomanip>

#include <cstring>

#include <cstdlib>

using namespace std;

// Function Declarations

void display(char alphabets[],int MAX_SIZE);

void reverse(char alphabets[],int MAX_SIZE);

void swap(char &ch1,char &ch2);

int main() {

 //Declaring constant

const int MAX_SIZE=26;

 

//Declaring a char array

char alphabets[MAX_SIZE];

 

//Populating the array with alphabets

for(int i=0;i<MAX_SIZE;i++)

{

 alphabets[i]=(char)(65+i);

 }

 

 cout<<"Original: ";

 display(alphabets,MAX_SIZE);

 reverse(alphabets,MAX_SIZE);

 cout<<"Reversed: ";

 display(alphabets,MAX_SIZE);

 return 0;

}

//This function will display the array contents

void display(char alphabets[],int MAX_SIZE)

{

 for(int i=0;i<MAX_SIZE;i++)

 {

    cout<<alphabets[i]<<" ";

 }

 cout<<endl;

}

//This function will reverse the array elements

void reverse(char alphabets[],int MAX_SIZE)

{

 int first,last;

 first=0;

 last=MAX_SIZE-1;

 

 while(first<last)

 {

   

    swap(alphabets[first],alphabets[last]);

    first++;

    last--;

   

 }

}

void swap(char &ch1,char &ch2)

{

 char temp;

 temp=ch1;

 ch1=ch2;

 ch2=temp;

You might be interested in
Please help I’ll give brainleistt
iren2701 [21]

Answer:

7. B

8. A

9. B

10. B

11. A

Explanation:

6 0
2 years ago
Using the Sakila database, create a query that displays the film title, description, as well the actor first and last name for a
Alex787 [66]

Answer:

Select title, description , first_name, last_name from film inner join film_actor on film.film_id = film_actor.film_id inner join actor on film_actor.actor_id = actor.actor_id where title LIKE 'zo%';

Explanation:

  • The INNER JOIN keyword selects records that have matching values in both tables.
  • The WHERE clause is used to filter records.
  • The WHERE clause is used to extract only those records that fulfill a specified condition.
7 0
3 years ago
Write F id the following is formatting tags, H for heading tags, S for structural tags, and SC if it belongs to a seperator/cont
Rina8888 [55]

Answer:

Here!

Hope this helps. Please mark brainliest!

6 0
2 years ago
Peter is software designer working at a big software company. He just found out that he has been shifted to their downtown branc
sweet [91]

The managers at Peter’s company have an Autocratic environment.

<u>Explanation:</u>

The managers who are autocratic in nature make decisions on their own. They will never get insights of their employees and they will not take the inputs of them in taking any decisions. This type of management is suitable in an organisation where there is an urgent need to taking decisions to any matter.

Managers who are autocratic in nature will make decisions without consulting anyone's advice.  This type suits those organisations wherein there are very less number of employees. Here, the manager of Peter did not consulted peter in making decisions related to him, the environment is authoritarian or autocratic.  

7 0
3 years ago
Bulleted and Numbered List button appear in the ………….. Toolbar.​
stich3 [128]

Answer:

The answer to this question is given below in the explanation section

Explanation:

Bulleted and Numbered List button appear in the <u>Paragraph </u>Toolbar.​

On word processing software, these options display in paragraph toolbar in the Home ribbon.

for example, in MS Word, you can find them in the Home tab under paragraph groups of command.

however, it is noted that these options are appear in some other software under the formating toolbar.

8 0
3 years ago
Other questions:
  • Samantha writes technical content for a webpage and uploads it to the webpage. What should she do to ensure that the content, wh
    11·2 answers
  • What effect can camera tilt create? Do you think this is effective? Why or why not?
    13·1 answer
  • Mr. Green maintains a spreadsheet containing data on all of his employees, including name, job profile, monthly salary, and home
    15·1 answer
  • What document type would be best to communicate sales items from a business to potential customer?
    12·1 answer
  • A computer has 9850 processes and 172 of them where suspended while 276 were terminated.,explain why some of the processes where
    15·1 answer
  • A simulation model includes: a. a description of the components of the system. b. a simulation clock. c. a definition of the sta
    8·1 answer
  • Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop shou
    5·1 answer
  • Why is failure important when you are designing a solution to a problem?
    6·2 answers
  • Please describe the role of games in modern society!
    5·2 answers
  • True or False <br> Hebrew Bible and the Koran were first written in English.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!