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
………………….. is the process of causing a system variable to conform to some desired value. Options Control feedback Design none of
frutty [35]
Control <span>is the process of causing a system variable to conform to some desired value. Options Control feedback Design none of the above</span>
4 0
2 years ago
Question 9/10
Firlakuza [10]
They sometimes offer free service
5 0
3 years ago
Read 2 more answers
Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In 1–2 sentences, descri
Tresset [83]

Carlos Should use a Security Camera to keep track of his physical hardware. Carlos can then use a computer to monitor the security cameras.

7 0
3 years ago
Read 2 more answers
The means by which an operating system or any other program interacts with the user is called th
natulia [17]
Networking capabilities of a computer
7 0
3 years ago
Which of these is an example of an input?
boyakko [2]

Answer:

typing on a key board

this is the best Ans.

8 0
2 years ago
Other questions:
  • Jennifer recently bought a new computer to type a new manuscript she’s been working on. She also stored a lot of movies on it to
    10·1 answer
  • If 15 bits are sent in 3 seconds then Bits intervalis__________
    13·1 answer
  • Select the correct answer.
    10·1 answer
  • A student is browsing a website. While browsing, he click on a link that takes him to another website. Which code gives the corr
    14·1 answer
  • time to throw poggers xqc time to throw pogchamp time to throw pogchamp time to throw pogchamp time to throw pogchamp time to th
    5·2 answers
  • Help brainleist giving exam
    15·1 answer
  • What is meant by Information Retrieval?
    8·1 answer
  • What is hub.pls ans from pic. for computers​
    9·2 answers
  • What problems do you see in the process of transacting business online
    10·1 answer
  • Write a function, called valFrequency, that given a list of values as a parameter, counts the frequencies for each value in the
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!