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
Whats happens when you add the numbers 1 and 1 together (1+1)<br> 11<br> 32<br> 2<br> 9
Neko [114]

Answer:

2

Explanation:

The mathematical answer would be 2. To get 11, one would simply put the 1's next to each other but there is an addition symbol. 32 is an irrational number to think of for an answer because there are no other numbers to add or multiply with the 1's to achieve 32. 9 is also irrational for the same reason.

6 0
2 years ago
The company that you work for has recently had a security breech. During the recover and assessment, it was discovered that the
mars1129 [50]

Answer:

I recommend Digital Certification of User through trusted certification Authority, who is requesting to access the company website through VPN to make sure the identity of the user.

Explanation:

Digital Certificate is the type of identity key or certificate that is assigned to the users as per their request. It is a unique number that is assigned to the user to ensure the authentication that Who are you. It is same like our identity card number that shows our identity to someone as per requirement.

These certificates are issued by certification organizations that are registered or trusted. If the users are using VPN on their devices to access some website that may not be a trusted user or a malware that can hurt the company by breaching the security protocols. So, some companies didn't allow untrusted users to websites.

<em>Therefore, I recommend to my company that, they should ensure that the users that are trying to access the website through VPN must have some digital Certificate from trusted certification authority to ensure the identity of the users.</em>

<em />

6 0
3 years ago
Powerpoint provides only three picture effects. true or false.
scZoUnD [109]
False, there is a variety
4 0
3 years ago
Define a function max_n(arr, n) that takes in an array and an integer as arguments. Your function will then return the n largest
NikAS [45]

Answer:

def max_n(arr, n):

   arr.sort()

   i = len(arr)-n

   return arr[i:]

Explanation:

Define a function called max_n that takes two parameters, an array and an integer

Sort the array

In order to get the last n largest values, we need to slice the array. To do that we need a starting point. Our starting point of slicing will be the "lentgh of the array - n". That means, if we start slicing from that index to the last in the sorted array, we will get the last n largest values.

Assume array is 10, 2, 444, 91 initially.

When we sort it, it becomes 2, 10, 91, 444

Now let's say we want last 2 largest values, our sliced array index should start from 2 and go until the end

i = 4 - 2 = 2 → arr[2:]  will return us 91 and 444

4 0
3 years ago
A Software Developer wants to add a new feature to an existing application operating in the Cloud, but only wants to pay for the
Mamont248 [21]

A term which describes this feature of cloud computing is: C. serverless computing.

<h3>The features of cloud computing.</h3>

In Computer technology, the features of cloud computing include the following:

  • Elasticity
  • Pooled resources
  • On-Demand self-service
  • Multitenancy
  • Serverless computing

In Cloud computing, serverless computing is a feature that is typically used to add a new feature to an existing software application that is operating in the Cloud while having to pay only for the computing time which the software code actually uses when it is called.

Read more on cloud computing here: brainly.com/question/19057393

#SPJ1

8 0
2 years ago
Read 2 more answers
Other questions:
  • Sushant is a new manager and he wants to share his ideas and working protocol with his team.Compare the advantages and disadvant
    13·1 answer
  • when seeking information on the on the internet about a variety of subjects the most useful place to look would be?
    13·1 answer
  • Assume that the following code exists inside a method of MyClass, and that this code compiles without errors: int result = book.
    13·1 answer
  • Assume we perform a known-plaintext attack against DES with one pair of plaintext and ciphertext. How many keys do we have to te
    14·1 answer
  • Select the correct word to complete the sentence
    11·2 answers
  • While developing a network application, a programmer adds functionally that allows her to access the running program without aut
    14·1 answer
  • Windows is a GUI Operating System, what is the other type?
    8·1 answer
  • How to add a while loop? here's my code
    5·1 answer
  • A manager suspects that one of his team members has been fraudulently accessing confidential and sensitive information and breac
    8·2 answers
  • Given the following class, Book, Write code for the following:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!