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
Write a paragraph on the importance of backing up data and mention at least three ways to back up data from your computer.
Scrat [10]

Answer:

Data backup is probably the most important part of any IT system. Backing up your data means periodically saving a copy of your computer’s information to an offsite location for safe keeping. Having a copy of your computer’s data protects it from being lost in the event of a hard drive failure

Explanation:

1-     On a Hard Drive (Onsite Backup)

2-     Online Backup Services (Offsite Backup)

3-     Cloud Backup Services (Offsite Backup)

5 0
4 years ago
. Evan is creating a worksheet and needs to copy information in cells A2:A13 into cells B2:B13. Which of the following is the ea
Fantom [35]
Highlight A2 and drag down and select the cells to A13. Then do ctrl+c to copy.
Next Highlight the cell B2 and then do ctrl+v. This will paste all the cells 
4 0
3 years ago
Which of the statements is most likely true about the differences between the basic version and premium version of StreamPal
romanna [79]

Answer:

I

Explanation:

8 0
3 years ago
Read 2 more answers
In a class hierarchy,
kondor19780726 [428]

Answer:

The correct answer to the following question will be Option D.

Explanation:

  • A collection of nested title scopes are defined by the class hierarchy, even though a collection of nested methodologies as well as blocks see in an everything else.
  • From the all, the lexical role characterizes the connection between certain scopes of names - if method d would be decided to declare somewhere within procedure c, therefore the namespace within the namespace of c would be nested.
  • The more common classes in such a family hierarchy were near the peak of the tree as well as more specific classes are towards the edges.

Other choices have no connection with the given situation. So Option D seems to be the right response.

4 0
3 years ago
QUICK HELP ME PLEASE
Sholpan [36]

Answer: Cable Internet access requires the setting up of fiber cables. It is the fastest type of Internet access technology. that's the answer

4 0
3 years ago
Other questions:
  • Write a static method, getBigWords, that gets a single String parameter and returns an array whose elements are the words in the
    15·1 answer
  • To print a budget:________.
    15·1 answer
  • Create an application that writes a series of random numbers to a file. Each random number should be in the range of 1 through 1
    9·1 answer
  • Which statement best describes a transition in PowerPoint?
    12·1 answer
  • What advantage does digital storytelling have over oral storytelling traditions?
    6·1 answer
  • The find and
    10·1 answer
  • Which workplace trend are outsourcing and telecommuting are examples of? Please select the best answer from the choices provided
    13·2 answers
  • When are bar charts most commonly used
    10·1 answer
  • Create a high-level plan to perform a gap analysis for Fullsoft Inc
    7·1 answer
  • What virtual, logically defined device operates at the data link layer to pass frames between nodes?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!