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
The Department Manager researches new data platforms for the company and requests a list of essential features. Which essential
Ipatiy [6.2K]

Answer:

Centralisation

dashboard , programmatic access

Explanation:

hope it helps u

mark me as brainlist

4 0
3 years ago
What might be some challenges if you’re trying to design a product for someone
ValentinkaMS [17]

Answer:

failure

Explanation:

if someone dosnt like it

4 0
3 years ago
Read 2 more answers
IT professionals have a responsibility to educate employees about the risks of hot spots. Which of the following are risks assoc
kodGreya [7K]

Answer:

third partying and computer hackers.

Explanation:

7 0
3 years ago
(Display four patterns using loops) Ask the user to enter an integer to
fomenos

Answer:

Hi There was small mistake. It is working fine for me. When you run from command line - use LoopPattern, not looppatern

import java.util.Scanner;

public class Looppattern {

  public static void main(String[] args) {

      Scanner sc = new Scanner(System.in);

      System.out.println("Enter how man levels you need: ");

      int levels = sc.nextInt();

      System.out.println("\n---------------Pattern A-----------------\n");

      for (int p = 1; p <= levels; p++) {

          for (int k = 1; k <= p; k++) { // increasing each level printing

              System.out.print(k);

          }

          System.out.println();

      }

      System.out.println("\n---------------Pattern B-----------------\n");

      int r = levels;

      for (int p = 1; p <= levels; p++) {

          for (int k = 1; k <= r; k++) {

              System.out.print(k);

          }

          r--; // decreasing levels

          System.out.println();

      }

      System.out.println("\n---------------Pattern C-----------------\n");

      for (int p = 1; p <= levels; p++) { // here incresing

          for (int k = p; k > 0; k--) { // and here decreasing pattern to

                                          // achieve our required pattern

              System.out.print(k);

          }

          System.out.println();

      }

      System.out.println("\n---------------Pattern D-----------------\n");

      r = levels;

      for (int p = 1; p <= levels; p++) {

          for (int k = 1; k <= r; k++) {

              System.out.print(k);

          }

          r--; // decreasing levels

          System.out.println();

      }

  }

}

Explanation:

4 0
3 years ago
In symmetric encryption the same key is used to encrypt and decrypt a message. in asymmetric encryption different keys are used
Brrunno [24]

A useful advantage of Asymmetric encryption over symmetric encryption is that there is no secret channel necessary for the exchange of the public key, unlike in the symmetric encryption which requires a secret channel to send the secret key.  

Another advantage of Asymmetric encryption is that is has increased security. Asymmetric uses two different keys (Public and private) for both encryption and decryption of data while symmetric uses one.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Camera shock might happen if you do which of the following to your camera?
    6·2 answers
  • An intranet is an external network.TrueFalse
    15·1 answer
  • 1.Context clues can be used to determine the ________of an unfamiliar word
    5·2 answers
  • A serialized object is ________. an object represented as a sequence of bytes used to store the object's data in a file an objec
    5·2 answers
  • PowerPoint allows you to input files from variety of sources, such as Microsoft access.
    6·1 answer
  • HOW TO FREE UP RAM/MEMORY ON YOUR DEVICE?
    12·2 answers
  • Write programs in python to display “Valid Voter”. (condition : age of person should be
    15·1 answer
  • Explain the following buttons as used in emails:compose,inbox and Draft.<br>​
    10·1 answer
  • What is the diffrent between ibm pc and ibm compatibles in table:​
    11·1 answer
  • How do I create a powershell script to make a Windows user account that is a non-admin user
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!