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
After Daniel performed poorly on a test, his teacher advised him to do some self-reflection to figure out how he could get a bet
Free_Kalibri [48]

Daniel gives more and more time to self-reflection and improves the mistakes he was doing in the last exam.

<h3 /><h3>What is self-refelection?</h3>

Reflecting on oneself is similar to gazing in a mirror and reporting what you see. It is a method of evaluating your work habits, study style, and self. To think about something is the definition of reflection, given simply.

When Daniel didn't do well on an exam, his teacher suggested that he think about his performance to see how he may perform better on the upcoming test.

Examine the material he is familiar with. Consider whether he needs to change his study strategy. Request extra assistance from the instructor outside of class.

Examine the questions he didn't get right and consider why. Self-reflection is the process of assessing one's performance to identify any problem areas that require improvement.

Hence, daniel gives more and more time to self-reflection and improves the mistakes he was doing in the last exam.

To learn more about self-reflection refer;

brainly.com/question/14754364

#SPJ1

5 0
2 years ago
Please solve this in JAVA<br><br> Please see the attachment
Alina [70]

Answer:

I'm going to do it but you should try these things for yourself or else you won't learn.

Explanation:

-First create a project (I'm using Netbeans 14 and the project is a Maven, but the code should work on any IDE)


-Name the project 'ShoppingCartPrinter' and leave the package name as it is. This is the main class so the main method is gonna be there already.

-Then you will create a second class named 'ItemToPurchase'. So I'll leave the code in the attachment (at the bottom of my answer it's written 'Download txt') or else brainly will think it's some sort of redirection to another websites because of the 'dots' and won't let me post it.






Download txt
3 0
1 year ago
What specific type of tools can assist teams by identifying attacks and indicators of compromise by collecting, aggregating, and
Vladimir [108]

Answer:

The specific type of tools that can assist teams by identifying attacks and indicators of compromise by collecting, aggregating, and correlating log and alert data from routers, firewalls, IDS/IPS, endpoint logs, Web filtering devices, and other security issues are:

1. Arachni

2. Grabber

3. Iron wasp

4. Nogotofail

5. SonarQube

6. SQLMap

7. W3af

8. Wapiti

9. Wfuzz

10. ZedAttack Proxy Zap

Explanation:

The testing tool is capable of uncovering a number of vulnerabilities, to scan small web applications, to uncover over 25 types of web application vulnerabilities, to detect TLS/SSL vulnerabilities and misconfigurations, to measure the source code quality of a web application, to detect and utilize SQL injection vulnerability in a website’s database, to find over 200 types of security issues in web applications, to check web applications for security vulnerabilities.

The security testing tool supports command-line access for advanced users can also be used to intercept a proxy for manually testing a webpage.

5 0
3 years ago
Header and footer elements such as worksheet name, current date, and time are _____ elements, they change as your worksheet does
mario62 [17]
<span>Header and footer elements such as worksheet name, current date, and time are dynamic elements, they change as your worksheet does. Because the information they </span><span>contain ( page number, date,) changes that's why they are dynamic. Otherwise if the information was fixed, they would be static elements.</span>
7 0
3 years ago
In the Unified Process (UP), related activities are grouped into UP ____. a. Services b. Disciplines c. Cycles d. Practices
Paha777 [63]

Answer:

b. Disciplines

Explanation:

The Unified Process (UP) is a type of development framework that repeats itself and can be customized and used for several different variations of the same underlying process. In the Unified Process (UP), related activities are grouped into UP Disciplines, as one of the many components that make up the Unified Process.

6 0
2 years ago
Other questions:
  • Which IPv6 transition technology can be used with NAT routers and has the address prefix 2001::32?
    10·1 answer
  • A girl scout troop with 10 girl scouts and 2 leaders goes on a hike. When the path narrows, they must walk in single file with a
    12·1 answer
  • Self contained sequences of actions to be performed are?
    6·1 answer
  • What characters cannot be used in a filename?
    15·1 answer
  • Which of the following popular presentation software items do you have to purchase in order to use?
    11·2 answers
  • Para ti que es el sexting​
    11·1 answer
  • Who are the following furries?
    10·2 answers
  • Choose a problem that lends to an implementation that uses dynamic programming. Clearly state the problem and then provide high-
    10·1 answer
  • Discuss new concepts that you have learned about Cisco Devices and how they will be helpful in the workplace.
    11·1 answer
  • How does xm satellite deter nonsubscribers from listening to its transmissions? Does this make the radio programing a private go
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!