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
Vera_Pavlovna [14]
3 years ago
7

Write a program named as reverse.c that reads a message, then prints the reversal of the message. The output of the program shou

ld look like t
Computers and Technology
1 answer:
AfilCa [17]3 years ago
7 0

Answer:

Written in C:

#include <stdio.h>

#include <strings.h>

int main(){

   char userinput[100];

   printf("Enter a message: ");

   scanf("%s",&userinput);

   int lent = strlen(userinput);

   for (int i=lent-1; i>=0; i--)

     printf("%c",userinput[i]);

   return 0;    

}

Explanation:

This line declares a string variable

   char userinput[100];

This line prompts user for input

   printf("Enter a message: ");

This line gets user input

   scanf("%s",&userinput);

This line calculates the length of user input

   int lent = strlen(userinput);

This iterates through the characters of user input

   for (int i=lent-1; i>=0; i--)

This prints the characters in reverse

     printf("%c",userinput[i]);

You might be interested in
Explain briefly the FIREWALLS
Vlada [557]

Answer:

Think of a firewall as your own personal security guard. The firewall will block unapproved websites from talking to your computer and will stop your computer from talking to unapproved/unnecessary websites. Hope this helps!

Explanation:

7 0
3 years ago
What are the importance of computer software​
Katen [24]

Answer:

It controls and coordinates all hardware and software functions within your PC. It is designed to be ever-improving so that newer tasks are performed more efficiently.

4 0
2 years ago
Read 2 more answers
For which is a chart legend used?
Sidana [21]
From the data I gathered I would conclude that C is the correct answer.
3 0
4 years ago
I need someone to help. This is the links I found and I'm going through the same thing. I live in small town where they think I'
Hunter-Best [27]

Huh what exactly do you need help with

8 0
3 years ago
WILL GIVE BRAINLIEST AND 75 POINTS!!!
pshichka [43]

Answer:

Glomar Challenger studies about the "age of rocks in various places in the ocean" in 1968

Explanation:

Glomar Challenger was a "deep sea research vessel" for marine geology and oceanography studies.

The vessel set out in 1968 on a "Deep Sea Drilling Program" in the Atlantic Ocean.

Samples were collected from various drilling locations and the study and analysis of these samples enabled the study of plate tectonics.

These samples also provided more information related to the rocks in oceans.

The vessel drilled cores containing rock salt, gypsum, anhydrite and several other evaporating minerals.

8 0
4 years ago
Read 2 more answers
Other questions:
  • You can advance slides during a slideshow by pressing the page down key
    7·1 answer
  • In __________ write, the data are stored in the cache, and control returns to the caller. Select one: a. a synchronous b. a buff
    8·1 answer
  • Use the _____ and _____ features to prevent field columns from showing or to view two nonadjacent field columns for comparison.
    6·1 answer
  • Every modern nation has a Central Bank. Which of the following is the Central Bank for these United States?
    14·2 answers
  • The advantages of the dynamo
    15·1 answer
  • Write a program to compute the sum of digits in a number given by the user. You must use your own function to compute the sum of
    6·1 answer
  • A folder is a collection of related of data is true or false​
    10·2 answers
  • Where is the option to set Conditional Formatting rules found?
    6·1 answer
  • Name any two software programs that employees can use to communicate effectively ​
    9·1 answer
  • WILL GIVE BRAINLIST Which statements accurately describe electronic tools? Check all that apply. Electronic tools collect large
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!