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
Kamila [148]
3 years ago
9

Write a program that removes all spaces from the given input. You may assume that the input string will not exceed 50 characters

. Ex: If the input is: Hello my name is John. the output is: HellomynameisJohn. Your program must define and call the following function. userString is the user specified string. The function assigns userStringNoSpaces with the user specified string without spaces. void RemoveSpaces(char userString[], char userStringNoSpaces[]) Note: This is a lab based on a previous chapter that now requires the use of a function.

Engineering
2 answers:
GrogVix [38]3 years ago
5 0

Answer:

Program that removes all spaces from the given input

Explanation:

// An efficient Java program to remove all spaces  

// from a string  

class GFG  

{  

 

// Function to remove all spaces  

// from a given string  

static int removeSpaces(char []str)  

{  

   // To keep track of non-space character count  

   int count = 0;  

 

   // Traverse the given string.  

   // If current character  

   // is not space, then place  

   // it at index 'count++'  

   for (int i = 0; i<str.length; i++)  

       if (str[i] != ' ')  

           str[count++] = str[i]; // here count is  

                                   // incremented  

         

   return count;  

}  

 

// Driver code  

public static void main(String[] args)  

{  

   char str[] = "g eeks for ge eeks ".toCharArray();  

   int i = removeSpaces(str);  

   System.out.println(String.valueOf(str).subSequence(0, i));  

}  

}  

Law Incorporation [45]3 years ago
3 0

Answer:

Please see attachment

Explanation:

Please see attachment

You might be interested in
A 100 ft long steel wire has a cross-sectional area of 0.0144 in.2. When a force of 270 lb is applied to the wire, its length in
blondinia [14]

Answer:

(a) The stress on the steel wire is 19,000 Psi

(b) The strain on the steel wire is 0.00063

(c) The modulus of elasticity of the steel is 30,000,000 Psi

Explanation:

Given;

length of steel wire, L = 100 ft

cross-sectional area, A = 0.0144 in²

applied force, F = 270 lb

extension of the wire, e = 0.75 in

<u>Part (A)</u> The stress on the steel wire;

δ = F/A

   = 270 / 0.0144

δ  = 18750 lb/in² = 19,000 Psi

<u>Part (B)</u> The strain on the steel wire;

σ = e/ L

L = 100 ft = 1200 in

σ = 0.75 / 1200

σ = 0.00063

<u>Part (C)</u> The modulus of elasticity of the steel

E = δ/σ

   = 19,000 / 0.00063

E = 30,000,000 Psi

4 0
3 years ago
What are some common work contexts for Licensing Examiners and Inspectors? Select four options.
Akimi4 [234]

According to O*NET, the common work contexts for Licensing Examiners and Inspectors include:

  1. Telephone
  2. Face-to-face discussions
  3. Contact with others
  4. Importance of being exact or accurate.

O*NET is an acronym for occupational information network and it refers to a free resource center or online database that is updated from time to time with several occupational definitions, so as to help the following categories of people understand the current work situation in the United States of America:

  • Workforce development professionals
  • Students
  • Human resource (HR) managers
  • Job seekers
  • Business firms

On O*NET, work contexts are typically used to describe the physical and social elements that are common to a particular profession or occupational work. Also, the less common work contexts are listed toward the bottom while common work contexts are listed toward the top.

According to O*NET, the common work contexts for Licensing Examiners and Inspectors include:

1. Telephone

2. Face-to-face discussions

3. Contact with others

4. Importance of being exact or accurate.

Read more on work contexts here: brainly.com/question/22826220

6 0
2 years ago
Read 2 more answers
The size of Carvins Cove water reservoir is 3.2 billion gallons. Approximately, 11 cfs of water is continuous withdrawn from thi
Zolol [24]

Answer:

471 days

Explanation:

Capacity of Carvins Cove water reservoir = 3.2 billion gallons i.e. 3.2 x 10˄9 gallons

As,  

1 gallon = 0.133 cubic feet (cf)

Therefore,  

Capacity of Carvins Cove water reservoir in cf  = 3.2 x 10˄9 x 0.133

                                                                         = 4.28 x 10˄8

 

Applying Mass balance i.e

Accumulation = Mass In - Mass out   (Eq. 01)

Here  

Mass In = 0.5 cfs

Mass out = 11 cfs

Putting values in (Eq. 01)

Accumulation  = 0.5 - 11

                         = - 10.5 cfs

 

Negative accumulation shows that reservoir is depleting i.e. at a rate of 10.5 cubic feet per second.

Converting depletion of reservoir in cubic feet per hour = 10.5 x 3600

                                                                                       = 37,800

 

Converting depletion of reservoir in cubic feet per day = 37, 800 x 24

                                                                                         = 907,200  

 

i.e. 907,200 cubic feet volume is being depleted in days = 1 day

1 cubic feet volume is being depleted in days = 1/907,200 day

4.28 x 10˄8 cubic feet volume will deplete in days  = (4.28 x 10˄8) x                    1/907,200

                                                                                 = 471 Days.

 

Hence in case of continuous drought reservoir will last for 471 days before dry-up.

8 0
2 years ago
What type of engineer would be most likely to develop a design for cars? chemical civil materials mechanical
Andreyy89
I don’t know but good luck
4 0
3 years ago
An automotive fuel has a molar composition of 85% ethanol (C2H5OH) and 15% octane (C8H18). For complete combustion in air, deter
slava [35]

Answer:

a) 1

b) 1813.96 MJ/kmol

c) 32.43 MJ/kg ,  1980.39 MJ/Kmol

Explanation:

molar mass of  ethanol (C2H5OH) = 46 g/mol

molar mass of   octane (C8H18) = 114 g/mol

therefore the moles of ethanol and octane

ethanol =  0.85 / 46

octane = 0.15 / 114

a) determine the molar air-fuel ratio and air-fuel ratio by mass

attached below

mass of air / mass of fuel = 12.17 / 1 = 12.17

b ) Determine the lower heating value

LHV  of  ( C2H5OH) = 26.8 * 46 = 1232.8 MJ/kmol

LHV  of (C8H18). = 44.8 mj/kg * 114 kg/kmol = 5107.2 MJ/Kmol

LHV ( MJ/kmol)  for fuel mixture = 0.85 * 1232.8 + 0.15 * 5107.2 = 1813.96 MJ/kmol

c) Determine higher heating value  ( HHV )

HHV of (C2H5OH) = 29.7 * 46 = 1366.2 MJ/kmol

HHV of C8H18 = 47.9 MJ/kg * 114 = 5460.6 MJ/kmol

HHV  in MJ/kg  = 0.85 * 29.7 + 0.15 * 47.9  = 32.43 MJ/kg

HHV in  MJ /kmol  =  0.85 * 1366.2 + 0.15 * 5460.8 = 1980.39 MJ/Kmol

4 0
2 years ago
Other questions:
  • A room has a width of 14.1 feet, a length of 15.5 feet, and a ceiling height of 12.0 ft. The average flow rate for this room's a
    6·1 answer
  • As of January 1, 2018, Farley Co. had a credit balance of $534,000 in its allowance for uncollectible accounts. Based on experie
    10·1 answer
  • Please describe a real situation in which you had to troubleshoot and fix the failure of a piece equipment/machine?
    5·1 answer
  • What is stress corrosion cracking?
    9·1 answer
  • A completely reversible heat pump produces heat ata rate of 300 kW to warm a house maintained at 24°C. Theexterior air, which is
    6·1 answer
  • The bulk density of a compacted soil specimen (Gs = 2.70) and its water content are 2060 kg/m^3 and 15.3%, respectively. If the
    5·1 answer
  • A wing generates a lift L when moving through sea-level air with a velocity U. How fast must the wing move through the air at an
    7·1 answer
  • Which of the following best describes the basic purpose of the internet?
    7·2 answers
  • List five pieces of personal safety equipment which must be in everyday use in the workshop​
    15·1 answer
  • Aqueous cleaners are ________ parts cleaning agents.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!