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
pickupchik [31]
4 years ago
9

1. An integer in C (int) is represented by 4 bytes (1 byte = 8 bits). Find the largest integer that can be handled by C. Verify

that number by computer (try to printf that number, and printf that number +1). No programming is required for this. Hint: (a) Conversion from binary to decimal: 3 2 1 0 2 1101 =1 2 + 0 2 +1 2 +1 2 = 8 + 0 + 2 +1 10 =11 (b) If an integer is represented by 1 byte (8 bits), the maximum integer number is 1111111 (Seven 1's as one bit must be reserved for a sign). 6 5 0 2 1111111 =1 2 +1 2 ++1 2 1 2 1 7 =  − =128 −1 (c) The number looks like a telephone number in Dallas.
Computers and Technology
1 answer:
faust18 [17]4 years ago
4 0

Answer:

Check the explanation

Explanation:

In C, int requires 4 butes to sotre a integer number. that means it requires 4*8 = 32 bits. The maximum number can be stored using 32 bits is

(11111111111111111111111111111111)_2

The first digit is used for sign. decimal equivalent to this number can be computed as

(1111111111111111111111111111111)_2= 1\times2^{30}+1\times2^{29}+...+1\times2^0

=1\times2^{31}-1

= 2147483647-1=2147483646

That means int can store a up to 2147483646.

                      Testing with C code

#include<stdio.h>

int main()

{

  int a = 2147483647; // a with max number

  printf("%d\n",a);// printing max number

  a = a+1;// adding one to the number

  printf("%d\n",a);// printing the number after adding one

  return 0;

}

                THE OUTPUT

$ ./a.out

2147483647

-2147483648

You might be interested in
What will be the output of the following query on the table below?
shtirl [24]

Answer:

b

Explanation:

7 0
3 years ago
Read 2 more answers
To rename a worksheet, you change the text on the ? HELP ASAP
prohojiy [21]
If this is Excel, it would be C. Sheet tab
5 0
3 years ago
Question #5
Anestetic [448]

Answer:

d;  attribute

Explanation:

8 0
3 years ago
Read 2 more answers
The OneDrive for Business application opens every time you start your program. You want to stop the program from automatically s
densk [106]

Answer:

Using the Task Manager to disable the OneDrive startup program.

Explanation:

To stop OneDrive for Business application from opening every time you start your computer you can use task Manager to disable the OneDrive startup program.

This can be achieved by:

  • Press Ctrl+Shift+Esc keys together to open Task Manager. You can also open it by right-click on Taskbar and select Task Manager option.
  • Now go to "Startup" tab in Task Manager, select "Microsoft OneDrive" item given in the list and click on "Disable" button.
  • That's it. Restart your computer and OneDrive will no longer start with Windows.
4 0
4 years ago
Use rounding to decide if the answer is reasonable. Write
erik [133]

Answer:

348 + 395 = 743

Hence, together they have 743 pennies and not 653 pennies. And we cannot perform the rounding, as that is the case when we have the decimal number or the float number. Only then we have the digits after the decimal. And if it's more than 5, we add 1 to the previous or else leave the number as it is. And we go on performing from right to left, and till the number of decimal places, we need to round off. However, here its purely an integer, and hence we cannot round off, as that will result in a significant loss, and which is not acceptable. However, if we want to round off before decimal places as well, then in that case 743 will be $7s, and 653 pennies will be 6+1= $7s, and if this level of loss is acceptable then we can assume that they have the same sum of money. However, here the answer is given in pennies, and hence this is not the case. And hence the answer given in the question is not correct.

Explanation:

The answer is self-explanatory. And since both are numbers, rounding is not required(as explained in the answer section), as it is required in case of decimal and float(as explained in the answer section). And as explained in the answer section, if we can tolerate very heavy loss, then the numbers as well can be rounded off as explained in the answer section. But that is not the case here, as the answer is given in pennies.

6 0
3 years ago
Other questions:
  • What is the role of the ieee in computer networking and wireless communications?
    14·1 answer
  • To pinpoint an earthquake's location, scientists need information from how many seismometers?
    8·1 answer
  • Does an android tablet have a hard drive
    7·1 answer
  • While a threat intelligence analyst was researching an indicator of compromise on a search engine, the web proxy generated an al
    7·1 answer
  • Write a class for a Cat that is a subclass of Pet. In addition to a name and owner, a cat will have a breed and will say "meow"
    14·1 answer
  • There will be 10 numbers stored contiguously in the computer at location x 7000 . Write a complete LC-3 program, starting at loc
    14·2 answers
  • Which are two main areas of the properties inspector
    7·1 answer
  • An organization requires secure configuration baselines for all platforms and technologies that are used. If any system cannot c
    7·1 answer
  • What are the pros and cons of using ICT​
    13·1 answer
  • An IT security threat is anything that might cause serious harm to a computer system.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!