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

rocess inputs using the following 1) Write a function that inputs numerical digits in the range of an unsigned short. 2) Write a

function that reverses the number to a range of a signed short. 3) Only subtract the largest 3 digit number from the reverse if the result is not negative.
Computers and Technology
1 answer:
yawa3891 [41]3 years ago
4 0

Answer:

 /* sizeof.c—Program to tell the size of the C variable */

 /*      type in bytes */

 

 #include <stdio.h>

 

   int main(void)

  {

  printf( "\nA char   is %d bytes", sizeof( char ));

  printf( "\nAn int   is %d bytes", sizeof( int ));

  printf( "\nA short   is %d bytes", sizeof( short ));

  printf( "\nA long   is %d bytes", sizeof( long ));

  printf( "\nA long long is %d bytes\n", sizeof( long long));

  printf( "\nAn unsigned char is %d bytes", sizeof( unsigned char ));

  printf( "\nAn unsigned int  is %d bytes", sizeof( unsigned int ));

  printf( "\nAn unsigned short is %d bytes", sizeof( unsigned short ));

  printf( "\nAn unsigned long is %d bytes", sizeof( unsigned long ));

  printf( "\nAn unsigned long long is %d bytes\n",

   sizeof( unsigned long long));

 printf( "\nA float   is %d bytes", sizeof( float ));

 printf( "\nA double  is %d bytes\n", sizeof( double ));

 printf( "\nA long double is %d bytes\n", sizeof( long double ));

return 0;

 }

2. #include<stdio.h>

int main(){

  int num,reverse_number;

  //User would input the number

  printf("\nEnter any number:");

  scanf("%d",&num);

  //Calling user defined function to perform reverse

  reverse_number=reverse_function(num);

  printf("\nAfter reverse the no is :%d",reverse_number);

  return 0;

}

int sum=0,rem;

reverse_function(int num){

  if(num){

     rem=num%10;

     sum=sum*10+rem;

     reverse_function(num/10);

  }

  else

     return sum;

  return sum;

}

3.  

#include <bits/stdc++.h>  

 

using namespace std;  

/* Iterative function to reverse digits of num*/

int reversDigits(int num)  

{  

   int rev_num = 0;  

   while(num > 0)  

   {  

       rev_num = rev_num*10 + num%10;  

       num = num/10;  

   }  

   return rev_num;  

}  

 

/*Driver program to test reversDigits*/

int main()  

{  

   int num = 4562;  

   cout << "Reverse of no. is "

        << reversDigits(num);  

   getchar();  

   return 0;

You might be interested in
When creating an electronic slide presentation, Lee should avoid
Amanda [17]

I believe the answer is <u>Using sound effects between slides.</u>

Using sound effects between slides can cause for a distraction, and if you are in college, your professor may not score your presentation as well as if it were made without sound effects. Hope this helps!

5 0
3 years ago
The commands available here change depending on the activity taking place in the presentation window's main work area.
pickupchik [31]

task pane is correct!

7 0
3 years ago
Read 2 more answers
Rules used in naming variables in object oriented programming​
schepotkina [342]

Answer:

Explanation: Name your variables based on the terms of the subject area, so that the variable name clearly describes its purpose.

4 0
3 years ago
Sharing a workbook enables multiple users to access the workbook. What are the benefits of using a shared workbook?
damaskus [11]

Answer:

Some of the benefits of sharing a workbook include:

A. Shared information between students (ie: Mary writes a note about (blank) in the workbook and John reads said note and receives addition information about (blank)).

B. ^adding onto this, discussion on interpretations of a passage (ie: John thinks (blank) means this and Mary thinks (blank) means other thing, through notes they can discuss the meaning of the text.

Hope this helps. =)

8 0
4 years ago
What is the main goal of computer generated by digitalization
mars1129 [50]

Answer:

for better future and attractive human life

4 0
4 years ago
Other questions:
  • You can access various sites on the WWW by using hyperlinks or by
    14·1 answer
  • Load the titanic sample dataset from the Seaborn library into Python using a Pandas dataframe, and visualize the dataset. Create
    10·1 answer
  • How to change screen brightness windows 10?
    7·1 answer
  • Which feature was the first app available on a cell phone? A. Game B.contact list C.email D.ringtone
    11·1 answer
  • Suppose that a is a one-dimensional array of ints with a length of at least 2. Which of the following code fragments successfull
    8·1 answer
  • What is thought to have caused the extinction of the dinosaurs?
    13·1 answer
  • The ____ method returns an integer that represents the location of the substring within the string.
    13·1 answer
  • Consider the following static method.
    9·1 answer
  • What is the difference between PowerPoint and Outlook?
    5·1 answer
  • The action of entering data into your computer. This can be text typed in a word processing document, keywords entered in a sear
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!