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
Airida [17]
4 years ago
6

Write a program that removes all spaces from the given input.

Computers and Technology
1 answer:
sasho [114]4 years ago
5 0

Explanation:

#include<iostream>

#include<string.h>

using namespace std;

char *removestring(char str[80])

{

   int i,j,len;

   len = strlen(str);

   for( i = 0; i < len; i++)

   {

       if (str[i] == ' ')

       {

           for (j = i; j < len; j++)

               str[j] = str[j+1];

           len--;

       }

   }

   return str;

}

int main ()

{  

char  str[80];

   cout << "Enter a string : ";

   cin.getline(str, 80);

   strcpy(removestring(str), str);

   cout << "Resultant string : " << str;

   return 0;

}

In this program the input is obtained as an character array using getline(). Then it is passed to the user-defined function, then each character is analyzed and if space is found, then it is not copied.

C++ does not allow to return character array. So Character pointer is returned and the content is copied to the character array using "strcpy()". This is a built in function to copy pointer to array.

You might be interested in
What are some other ways to program a robot to navigate a complicated environment other than straight paths and right angle (90
In-s [12.5K]

Answer:

The most popular method of robot programming is probably the teach pendant. ... To program the robot, the operator moves it from point-to-point, using the buttons on the pendant to move it around and save each position individually. When the whole program has been learned, the robot can play back the points at full speed.

8 0
3 years ago
Read 2 more answers
Microsoft Office PowerPoint 2016 enables you to create robust multimedia _______.
Jet001 [13]

Microsoft Office PowerPoint 2016 enables you to create robust multimedia presentations.

What is Multimedia presentations?

A multimedia presentation is a type of presentation that uses various forms of digital communication to convey the message, such as video, interactive slides, audio clips, music, and more.

Multimedia presentations, in short, go beyond the use of text and images. Including digital media such as animation, video, audio, or interactive features such as forms, popups, and more can help to enrich your presentations visually.

A presentation consists of a series of slides. Each slide contains text, graphics, audio, and video content. The content can then be manipulated by adding transitions, animations, and graphic effects. Before you begin creating a presentation, you should become acquainted with some of PowerPoint's basic features.

To learn more about Presentations in PowerPoint, visit: brainly.com/question/23714390

#SPJ4

5 0
2 years ago
On the Audio Tools contextual tab, which tab will control how the audio file appears, if it appears, on the slide itself?
otez555 [7]

Answer:

<h2>B. Playback</h2>

Explanation:

Playback is the act of reproducing recorded sound; “he was allowed to hear the playback of his testimony”. The part of a tape recorder that reproduces the recorded material.

On the audio tools contextual tab, “playback” will control how the audio file appears, if it appears, on the slide itself.

Therefore, the correct answer is b. playback.

5 0
3 years ago
Read 2 more answers
What are the trinity of the computer system
zimovet [89]

Answer:

he Computer, the System, and the World. Simics is a great product for simulating computer systems that contain processors and execute code.

Explanation:

he Computer, the System, and the World. Simics is a great product for simulating computer systems that contain processors and execute code.

3 0
3 years ago
Which model involves the creation of data and process models during the development of an application?
guapka [62]
It seem like there are information missing on the question posted. Let me answer this question with all I know. So here is what I believe the answer is, <span>the creation model involves the creation of data and process models during the development of an application.</span>

Hope my answer would be a great help for you.    If you have more questions feel free to ask here at Brainly.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Which function of a web page relies on responsive web design? Adding extra horizontal scroll Blocking mobile devices from viewin
    11·2 answers
  • Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the ga
    12·2 answers
  • _____ is a component of a data model that defines the boundaries of a database, such as maximum and minimum values allowed for a
    12·1 answer
  • Kayle is building a web form. He has included space where users can input their phone numbers and email addresses. However, he w
    15·1 answer
  • What unit is used to describe the smallest amount of bitcoin?
    13·1 answer
  • What is the systems development life cycle (SDLC)? Group of answer choices Involves establishing a high-level plan of the intend
    8·1 answer
  • When a primitive type variable is passed as an argument to a method, what is passed into the receiving method's parameter variab
    12·1 answer
  • Many electronic devices use a(n) ?, which contains all the circuit parts in a miniature form.
    14·2 answers
  • Write a program that prints the numbers 1 - 50. If the number is even print the word 'EVEN!' next to it. If the number is odd pr
    10·1 answer
  • Can you please help me?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!