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
Naddika [18.5K]
3 years ago
7

Write a function that will alphabetize a string WITHOUT using the sort function :

Computers and Technology
1 answer:
Dimas [21]3 years ago
7 0

Answer:

here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// function to alphabetize the input string

void alphabetize(string &str)

{

// find the length of string

 int n=str.size();

 

  for(int x=0;x<n;x++){

      for(int y=x+1;y<n;y++)

      {  

          //swap the character

          if(str[x]>str[y]){

              char ch=str[x];

              str[x]=str[y];

              str[y]=ch;

          }

      }

  }

 

  cout<<"alphabetize string is: "<<str<<endl;;

 

}

int main()

{// string variable to read input

  string inp;

 

  cout<<"Please Enter a String in lowercase :";

  //reading the input

  cin>>inp;

  // call function with inp argument

  alphabetize(inp);

  return 0;

  }

Explanation:

Declare a variable "inp" of string type and assign the input string to it. call the alphabetize() function with argument "inp".In the alphabetize(),find the length  of input string.Then travers the string and if a character is greater than any  next character in the string then swap it, so that all the character are sorted.

Output:

Please Enter a String in lowercase :helloworld                                                                                                                

alphabetize string is: dehllloorw

You might be interested in
What is the fastest way to move data over long distances using the internet, for instance across countries or continents to your
Simora [160]

Answer:

Assuming you are using the AWS CLI to upload data to s3, there are two optimizations to increase the speed:

1) Parallel chunked uploading, which uploads your (large) file in chunks in parallel.

2) use Amazon S3 Transfer Acceleration

This will upload your file to a nearby CloudFront instance

You can enable this in your CLI configuration file, named config in the .aws folder. Add the following lines:

s3 =

max_concurrent_requests = 20

max_queue_size = 10000

multipart_threshold = 64MB

multipart_chunksize = 16MB

max_bandwidth = 100MB/s

use_accelerate_endpoint = true

addressing_style = path

5 0
3 years ago
When sending an electronic cover letter, an e-mail address is sufficient contact information.
Irina-Kira [14]

Answer:

False is the correct answer for the above question.

Explanation:

"Electronic cover letter" is a cover letter which is used with a resume or CV to state the additional information of that CV or resume. It is a cover letter attached to some documents. Just like, If a person bought some books then there is also a book cover attached with it which states about the book author and some other details about the book.

Just like, when a person writes a resume or CV then there is also needs a cover letter which is called "Electronic cover letter". To attach the cover letter a user needs a resume and to send that a user needs an email. So there are two important things to send the cover letter-- email address and document. But the question states that only email is important which is not correct. So the question statement is a false statement.

3 0
3 years ago
Read 2 more answers
How do I find unwanted programs on my computer?
Nataliya [291]

To find unwanted programs on my computer, you can find them from either the start menu, setting, or control panel.

Regardless of how old or new your computer is, it will undoubtedly contain at least one program that you don't require. You might try a different site if you can't locate the method you're looking for because there are various ways to remove apps and programs. Be aware that some applications and programs are part of Windows and cannot be removed.

If a program is just not functioning as it should, you can try to repair it first.

  • From the Start menu, remove

Search for the app in the displayed list by selecting Start > All apps.

Select Uninstall by pressing and holding (or right-clicking) the application.

  • Remove in Settings

Start > Settings > Apps > Apps & features should be selected.

Locate the app you wish to uninstall, then choose More > Uninstall.

Please take note that not all apps can currently be removed from the Settings app.

Follow the uninstall instructions found in the Control Panel if you need assistance removing these apps.

  • Remove from the Control Panel

Enter Control Panel in the taskbar search box and choose it from the list of results.

program > programs and features.

Then choose to Uninstall or Uninstall/Change by pressing and holding (or right-clicking) on the software you wish to uninstall. then adhere to the on-screen instructions.

To learn more about Program click here:

brainly.com/question/24440921

#SPJ4

5 0
1 year ago
What does the asterisk (*) after select tell the database to do in this query?
OlgaM077 [116]

In the case above, The asterisk helps database or tell it to select all data that meets the criteria as stated in the query.

<h3>What does asterisk (*) mean in SQL?</h3>

The term means all columns. Note that The asterisk or star symbol ( * ) is a term that implies all columns in a given database.

Therefore, In the case above, The asterisk helps database or tell it to select all data that meets the criteria as stated in the query.

Learn more about asterisk from

brainly.com/question/1620017

#SPJ11

4 0
2 years ago
The amount of data that can be stored on a disk depends in part on_____.
MariettaO [177]
To what it seems like, it’s d
8 0
3 years ago
Other questions:
  • What is a device driver?
    9·2 answers
  • Text, numbers,graphics, sounds entered into a computer's memory during input operations are referred to as
    11·1 answer
  • Compare the logical link control and the media access control. Which of the following is a correct statement?
    7·2 answers
  • What ipconfig command line option can be used to delete cached dns information from memory?​?
    9·1 answer
  • How to solve 3(x - 2) = 9x<br><img src="https://tex.z-dn.net/?f=3%28x%20-%202%29%20%3D%209x" id="TexFormula1" title="3(x - 2) =
    14·1 answer
  • Consider a binary-search method in an array that reports whether an object is in the array. The documentation indicates that the
    11·1 answer
  • Write 3 things that can't be done without technology. write your opinion?
    14·2 answers
  • Determine whether the phrase below is a sentence or a fragment.
    12·1 answer
  • 9. Which is an example of a function?<br>(1 Point)<br>=A1 +A2<br>=SUM(A1:A3)<br>=ADD(A1:A3)​
    14·2 answers
  • Which finger is used to press SHIFT key while typing!
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!