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
leva [86]
4 years ago
6

rite a function, reverseDigit, that takes an integer as a parameter and returns the number with its digits reversed. For example

: the value of reverseDigit(12345) is 54321; the value of reverseDigit(5600) is 65; the value of reverseDigit(7008) is 8007; and the value of reverseDigit(–532) is –235.
Computers and Technology
1 answer:
arlik [135]4 years ago
3 0

following are the code in c language

#include<stdio.h> // header file  

int reverseDigit(int n);  // prototype of  reverseDigit function

int main()  // main method

{

int n;  // variable declaration

printf("Enter a number to reverse\n");

scanf("%d", &n);  // input value by user

int t=reverseDigit(n);  // calling  reverseDigit function

printf("the value of reverseDigit(%d)",n);  

printf(" is %d",t); // display reverse digit

 return 0;

}

int reverseDigit(int n)   // function definition of reverseDigit function

{

   int r=0;

    while(n!=0)  // iterating over the loop

  {

     r = r* 10;

     r= r+ n%10;

     n= n/10;

  }

  return(r);  // return the reverse digit

  }

Explanation:

In this we call a function  reverseDigit, from the main function after calling control moves to the definition of  reverseDigit, function ,the while loop is iterating .In the while loop, we find the remainder r when number is divided  by 10 then it will multiplied by 10 and add previous remainder after that number will be updated as n/10 . Then function will return number r and print them in main function.

output

Enter a number to reverse

12345

the value of reverseDigit(12345) is 54321

You might be interested in
What are the types of action involving data base?
Alexeev081 [22]

Answer: The DBMS is a software system that explains the four types of actions, which are defining, constructing, manipulating, and sharing databases among various users and applications.

3 0
4 years ago
Sam has created a fashion website. There are many subscribers to his website. He has added new blogs, pictures, and articles abo
marusya05 [52]

Answer:

Post advertisements on social media and message the subscribers.

Explanation:

There is no point in not promoting and putting forward the work that he has been doing. All of the given options are about promoting the content but Sam needs to choose the ones which are efficient and seem professional as well.

Posting advertisements about the website promotes the content on a wider base and helps in luring more and more people to the website.

Messaging or sending an email to the subscribers is a healthy of letting the subscribers about the updates and latest posts.

8 0
3 years ago
Ted wants to share some information with his team. Match the levels of information with the content of the information that Matt
myrzilka [38]

The  Match up of the levels of information with the content of the information that Matt has shared are:

The nice to know - Ted makes an announcement of the total annual profit of the company.

The  should know - Ted gives his team a brief of the email etiquette for them to follow.

The  must know - Ted informs his team about the office work hours and dress code.

<h3>What do you mean by information?</h3>

Information is known to be data or any form of stimuli that connote a given meaning in some context to its receiver.

Hence, The  Match up of the levels of information with the content of the information that Matt has shared are:

The nice to know - Ted makes an announcement of the total annual profit of the company.

The  should know - Ted gives his team a brief of the email etiquette for them to follow.

The  must know - Ted informs his team about the office work hours and dress code.

Learn more about information from

brainly.com/question/4231278

#SPJ1

6 0
2 years ago
There are three types of operators in BASIC-256 <br>a) True b) False​
Anestetic [448]

Answer:

a)True is the answer......

6 0
3 years ago
Which of the following features of a network connection between a switch and server is not improved by link aggregation?
egoroff_w [7]

Answer: Speed

Explanation:

 Link aggregation is the process of a network connection between the switch and the server which are used for connections of the multiple parallel network. Line aggregations provides various advantages like increases the bandwidth, high availability and provides the fault tolerance but not speed because it increases the number of lanes not the speed as it is expensive and it does not increases the throughput of the system.

3 0
3 years ago
Other questions:
  • What are multiple worksheets
    7·1 answer
  • Your website is currently at position 5 in organic search. On a monthly basis you currently get on average 5,432 clicks and 32 c
    7·1 answer
  • Are computer virus and human virus the same​
    6·1 answer
  • Which of the following is necessary to connect a computer outside of the hospital to the hospital's server?
    15·1 answer
  • I stole you pokemon cards :o
    6·2 answers
  • Which is true about POP3 and IMAP for incoming email?
    13·1 answer
  • Can someone please please please help me!
    10·1 answer
  • What online resource would you use if you wanted to read a review about a new movie?
    8·1 answer
  • Which of the following statements best explains how multitasking works in the human mind?
    11·1 answer
  • What are the value and data type (float, int, bool, or str) of this expression:<br> 5 // 2
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!