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
nikklg [1K]
4 years ago
9

g given the signature of a function void ascendingwords(char sentence[], int size), where sentence is an array of characters(i.e

. a null terminated string) and size is the amount of memory allocated for the buffer sentence. Complete the function to print the words in the sentence in an ascending order. the user needs to provide the input. for example if the sentence is Programming is Fun. then the function should print the output Fun is Programming
Computers and Technology
1 answer:
BlackZzzverrR [31]4 years ago
6 0

Answer:

// This program is written in C++ programming language

// Comments are used for explanatory purpose

// Program starts here

#include<iostream>

using namespace std;

// Function starts here

string ascendingwords(string sentence)

{

// Calculate length of input text

int len = sentence.length() - 1;

// Create a begin and end variable

int begin, end = len + 1;

// Declare and initialize an output string

string output = "";

// Perform iteration while there's still some text in the input string

while(len >= 0)

{

if(sentence[len] == ' ')

{

begin = len + 1;

while(begin != end)

output += sentence[start++];

output += ' ';

end = len;

}

len--;

}

begin = 0;

while(begin != end)

output += sentence[begin++];

return output;

}

// Main method starts here

int main()

{

// Declare string

string sentence;

// Prompt user for input

cout<<"Enter a string: ";

cin>>sentence;

cout <<ascendingwords(sentence);

return 0;

}

You might be interested in
How to find HCF and LCM of a number in Q Basic program?? ​
DerKrebs [107]
CLS
INPUT "Enter the first number"; a
INPUT "Enter the second number"; b
m = a
n = b
WHILE a <> 0
r = b MOD a
b = a
a = r
WEND
l = (m * n) / b
PRINT "HCF is "; b
PRINT "LCM is "; l
3 0
2 years ago
Marisa wants to customize her computer's default firmware. ROM allows data to be changed or modified when necessary.
ludmilkaskok [199]

Answer: ROM stands for "Read-only memory", this is permanent, so false.

4 0
2 years ago
Read 2 more answers
URGENT!!!!
MA_775_DIABLO [31]
"Solve the problem: on the first day in a garden thrived with p% more flowers than in the previous day. Determine the total number of flowers that will bloom in the k days." What I translated. 

We would need to know the other answers before anyone could answer. There was completely no number given. 


8 0
3 years ago
What is indirect program memory addressing? Explain the working of the following instructions?
Elanso [62]
  • Indirect main memory addressing is described as the method in which the variable's address is stored in a mind register and also a command is utilized to point towards the memory registers which hold the register.
  • Instruction is used to direct towards a register that displays the results of the variables.
  • The register, in turn, refers to that variable's address in simplistic words. As just a result, it is indeed considered a passive program, memory address.

The instructions operate as follows:

a)

JMP AX :

  • The JMP instruction is being used to execute an unconditional jump.
  • AX is indeed the label's name.
  • JMP AX codes are being used to transfer control of the flow program to the AX label.

b)

JMP LIST:

  • The JMP command can be used to execute an unconditional jump, JMP LIST[DX] is the label's name.  
  • The JMP LIST[DX] program is being used to transfer control of its flow programs to the specified section.
  • It is the segment to which the flow control is transmitted.

c)

JMP NEAR PTR[DI+3]: 

  • Unconditional jumps could be done with the JMP command as you'll see, the label is JMP NEAR PTR[DI+3].
  • It's being used to transmit flow control to a particular section, throughout this case [DI+3].
  • The close keyword indicates that perhaps the code segment would be in the line of code being nearby.

Learn more:

brainly.com/question/20320915

4 0
3 years ago
Why is it difficult to correctly identify a new product as emerging technology
Gekata [30.6K]
Because a lot of people post false information on websites and marketing managers (whatever they're called) will actually falsely advertise their product as using new technology.
5 0
4 years ago
Other questions:
  • ASAP
    12·2 answers
  • Which of the following courses would an aspiring film composer most likely take?
    12·2 answers
  • The source ip address is 164.109.28.3 subnet mask of 255.255.128.0 network address is
    7·1 answer
  • Write a one-line program to output the following haiku.
    11·2 answers
  • Which of the following can be considered classifications of technology companies? (Select all that apply)
    11·1 answer
  • The _____ model of a systems development life cycle provides for progressive development of operational software, with each rele
    8·1 answer
  • One way that Intuit handles the ________ of its TurboTax and other financial software is through its websites. The site includes
    11·2 answers
  • Name the written test a potential driver must pass and list the minimum required score to earn a learner’s license.
    8·2 answers
  • How i simplify this boolean expression ?A'.B'.C'+A'.B'.C+A'.B.C+A.B'.C+A.B.C
    6·2 answers
  • What is office course<br> how to learn office course
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!