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
What do you use for soaking hands and holding soapy water​
sertanlavr [38]

Answer

???

Explanation:

Was this a school question?

5 0
3 years ago
Read 2 more answers
What is the purpose of a mutator?
choli [55]

Answer:

To change the value of private or protected members.

Explanation:

Mutator also known as setters are the member function or method in class that is used to set or change the value of private or protected members. Mutator does not return any values. They are very important in Object Oriented Programming.

3 0
4 years ago
Assume that the demand curve for DVD players shifts to the left and the supply curve for DVD players shifts to the right, but th
kari74 [83]

Answer:

a.both the equilibrium price and quantity of DVD players will decrease

Explanation:

When the amount required or given varies, even if the price stays the same, a move in the demand or supply curve occurs. Changes in the curve of demand mean that the initial relationship of production has shifted so that demand of quantity has a factor apart from cost influenced

A right shift change of the supply curve shows an increase in supply and, on equal footing, the equilibrium price decreases.

Once the demand curve shifts to the left, the demand decreases.

7 0
3 years ago
What is folded card publishing?​
Alexeev081 [22]

Answer:

Folded card This layout type is for creating greeting cards by printing pages on a sheet and then folding the sheet to make the card. If you choose the Folded card layout, then sheet fold options are displayed. Select an option in the list to specify how you will fold your publication

Explanation:

3 0
2 years ago
Read 2 more answers
Which letter is located at position (7,4) on this coordinate grid? A) B) C) D)
aleksklad [387]

It is letter d

gdstcccccccvdagjsbhbj cna cas

8 0
3 years ago
Other questions:
  • What does a computer user need to know about programming in order to play a video game?
    6·2 answers
  • To create bold shadows, which lighting choice would work best.
    7·1 answer
  • How do issues of equity, teacher education and budgeting impact technology in schools?
    7·2 answers
  • You accidentally moved your task bar from the bottom of the screen to the left side. You would like to
    14·2 answers
  • an individual’s Body Mass Index (BMI) is a measure of a person’s weight in relation to their height. it is calculated as follows
    6·1 answer
  • What is digital scavenger hunting? A. An application that locates addresses B. A scavenger hunt where players use GPS and digita
    5·1 answer
  • Drag the tiles to the correct boxes to complete the pairs.
    13·1 answer
  • Select the correct answer.
    8·1 answer
  • For each problem listed below, use the drop-down menu to select the field of the professional who can help solve the issue.
    7·2 answers
  • Jason is using his mother's computer. He plugs in his flash drive, but it does not appear in the explorer window. Suggest what J
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!