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]
3 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]3 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 should be done if a system cannot boot from the hard drive?
White raven [17]
If the system cannot boot from the hard drive, then you should boot from the windows set-up dvd

I hope this helps! :)
3 0
3 years ago
Describe the relative benefits of routing over a broadcast style of communication. Is routed traffic more secure than broadcasti
iren2701 [21]

Routing is process of selecting and establishing the routes that data packets take on their way to a particular destination (specific IP addresses). Broadcasting on the other hand is the simultaneous transmission of the same message to multiple recipients. In contrast to routing, broadcasting lacks the ability to direct packets to a specific address. When it comes to security, routing is not necessarily more secure than broadcasting. Without goof security protocols other users can read messages even if they aren't the recipient of the packet.

8 0
3 years ago
In Subtractive empathy, the counselor responses gives back less (or distorts) than what the client has said. slightly add someth
SashulF [63]

Answer:

gives back less (or distorts) than what the client has said.

Explanation:

Emotional intelligence can be defined as the cognitive ability of an individual or person to be able to recognize his or her emotions, have an understanding of the message being conveyed and knowing how these emotions affect the people around him or her.

Basically, there are five (5) main characteristics or features of emotional intelligence and these are;

I. Motivation.

II. Self-awareness.

III. Social skills.

IV. Self-regulation.

V. Empathy.

Empathy simply means putting yourself in a person's position, depicting how you will feel if you were in his or her situation. Also, empathy depicts getting the perspective of a thing through another person's lens, eyes or ears.

There are three (3) main types of empathy and these includes;

I. Basic (interchangeable empathy).

II. Additive empathy.

III. Subtractive empathy.

In Subtractive empathy, the counselor responses gives back less (or distorts) than what the client has said.

This ultimately implies that, subtractive empathy requires the counselor using an inappropriate listening or influencing skills.

5 0
2 years ago
9. The voltage of a replacement capacitor must
nasty-shy [4]

Answer:

B

Explanation:

It is the capacity (in Farad) of the capacitor that determines its behaviour in the circiut. The voltage is merely a qualification of what it can handle. Higher is "better".

6 0
3 years ago
Write a public interface named Test with the following behavior:
enyata [817]

Answer:

The code to this question can be given as:

Code:

public interface Test  //define interface  

{

   public abstract Duration getDuration(); //define method

getDuration.  

   public abstract Result check(int a);

//define method

check .

   public abstract double getScore();

//define method getScore.  

}

Explanation:

In the above code, we define an interface that is "Test" inside an interface, we define three methods that can be defined as:

  • First, we define a method that is "getDuration" that method returns  Duration as an object.
  • Second, we define a method that is "check" this method accepts an integer parameter that is a and return Result.
  • The third method is "getScore" this method will return a double value.
8 0
3 years ago
Other questions:
  • Complete the paragraph to explain how Angelina can notify readers that her report is just a draft. Angelina has decided to add t
    12·2 answers
  • Which of the following characters at the beginning of a cell signifies to Excel that it should perform a calculation for the val
    13·1 answer
  • A small company has hired you to take over its IT needs. The company currently has seven on-site employees and 12 remote employe
    12·1 answer
  • The accessibility of a website refers to which of
    6·1 answer
  • Boardman College maintains two files—one for Sociology majors and another for Anthropology majors. Each file contains students'
    5·1 answer
  • What type of result does the MATCH function, when used on its own, return?
    5·1 answer
  • What is the gauge manifold made of
    14·1 answer
  • Please as soon as possible
    13·1 answer
  • When a person bullies someone using technology, it's called:
    9·2 answers
  • Which of the following IS an operating system? *<br> Reddit<br> Ubuntu<br> Office 365<br> Mac Pro
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!