answer.
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
Brilliant_brown [7]
1 year ago
7

Return 1 if ptr points to an element within the specified intArray, 0 otherwise.

Computers and Technology
1 answer:
Paladinen [302]1 year ago
4 0

Answer:

int withinArray(int * intArray, int size, int * ptr) {

      if(ptr == NULL) // if ptr == NULL return 0

            return 0;

      // if end of intArr is reached

      if(size == 0)

          return 0; // element not found

  else  

          {

            if(*(intArray+size-1) == *(ptr)) // check if (size-1)th element is equal to ptr

                   return 1; // return 1

            return withinArray(intArray, size-1,ptr); // recursively call the function with size-1 elements

         }

}

Explanation:

Above is the completion of the program.

You might be interested in
in a small office, there are 5 computers, a network printer, and a broadband connection to the internet. what devices are needed
Nataly [62]

Answer:

<em>Ethernet cables, Network Adapters, Modem, Routers, Switches.</em>

Explanation:

<em>The devices that are required in setting up a wired network for the 5 computer comprises of the following devices </em>

  • <em>Ethernet Cables</em>
  • <em>Network Adapters</em>
  • <em>Modem/Router</em>
  • <em>Network Switch</em>

<em>Ethernet cables: They are called network cables or RJ-45 cables used to in connecting two or more computers together. it has different categories called, the untwisted pair and twisted pair Ethernet, with a speed from 10-1000</em>

<em>Network Adapters : This adapters allows a computer device to connect and interface with a network computer</em>

<em>Modem/Routers : A router is a device that that sits in the  middle  between your local computers and modems. it takes receives information or gets information from the modem and delivers it to the computer</em>

<em>Network switch: it connects more than two computers together to a network and share data among themselves and other devices on the network</em>

6 0
2 years ago
8.Change the following IP addresses from binary notation to dotted-decimal notation: a.01111111 11110000 01100111 01111101 b.101
Andrews [41]

Answer:

a. 01111111 11110000 01100111 01111101 dotted decimal notation:

(127.240.103.125)

b. 10101111 11000000 11111000 00011101 dotted decimal notation: (175.192.248.29)

c. 11011111 10110000 00011111 01011101 dotted decimal notation:

(223.176.31.93)

d. 11101111 11110111 11000111 00011101 dotted decimal notation:

(239.247.199.29)

a. 208.34.54.12 class is C

b. 238.34.2.1 class is D

c. 242.34.2.8 class is E

d. 129.14.6.8 class is B

a.11110111 11110011 10000111 11011101 class is E

b.10101111 11000000 11110000 00011101 class is B

c.11011111 10110000 00011111 01011101 class is C

d.11101111 11110111 11000111 00011101 class is D

Explanation:

8 a. 01111111 11110000 01100111 01111101

we have to convert this binary notation to dotted decimal notation.

01111111 = 0*2^7 + 1*2^6 + 1*2^5 + 1*2^4 + 1*2^3 + 1*2^2 + 1*2^1 + 1*2^0

           = 0 + 1*64 + 1*32 + 1*16 + 1*8 + 1*4 + 1*2 + 1

           = 64 + 32 + 16 + 8 + 4 + 2 + 1

           = 127

11110000 = 1*2^7 + 1*2^6 + 1*2^5 + 1*2^4 + 0*2^3 + 0*2^2 + 0*2^1 + 0*2^0

               = 1*128 + 1*64 + 1*32 + 16 + 0 + 0 + 0 + 0

               = 128 + 64 + 32 + 16

               = 240

01100111 = 0*2^7 + 1*2^6 + 1*2^5 + 0*2^4 +0*2^3 + 1*2^2 + 1*2^1 + 1*2^0

               = 0 + 1*64 + 1*32 + 0 + 0 + 4 + 2 + 1

               = 64 + 32 + 4 + 2 + 1

               = 103

01111101   = 0*2^7 + 1*2^6 + 1*2^5+ 1*2^4 +1*2^3 +1*2^2 + 0*2^1 + 1*2^0

               = 0 + 1*64 + 1*32 + 1*16 + 1*8 + 1* 4 + 0 + 1

               = 64 + 32 + 16 + 8 + 4 + 1

               = 125

So the IP address from binary notation 01111111 11110000 01100111 01111101 to dotted decimal notation is : 127.240.103.125

b) 10101111 11000000 11111000 00011101

10101111 = 1*2^7 + 0*2^6 + 1*2^5 + 0*2^4 + 1*2^3 + 1*2^2 + 1*2^1 + 1*2^0

             = 175

11000000 = 1*2^7 + 1*2^6 + 0*2^5 + 0*2^4 + 0*2^3 + 0*2^2 + 0*2^1 + 0*2^0

                 = 192

11111000 = 1*2^7 + 1*2^6 + 1*2^5 + 1*2^4 +1*2^3 + 0*2^2 + 0*2^1 + 0*2^0

              = 248

00011101 = 0*2^7 + 0*2^6 + 0*2^5 + 1*2^4 +1*2^3 + 1*2^2 + 0*2^1 + 1*2^0

               = 29

So the IP address from binary notation 10101111 11000000 11111000 00011101  to dotted decimal notation is : 175.192.248.29

c) 11011111 10110000 00011111 01011101

11011111 = 1*2^7 + 1*2^6 + 0*2^5 + 1*2^4 +1*2^3 + 1*2^2 + 1*2^1 + 1*2^0

           = 223

10110000 =  1*2^7 + 0*2^6 + 1*2^5 + 1*2^4 +0*2^3 + 0*2^2 + 0*2^1 + 0*2^0

                = 176

00011111 = 0*2^7 + 0*2^6 + 0*2^5 + 1*2^4 +1*2^3 + 1*2^2 + 1*2^1 + 1*2^0

              = 31

01011101 = 0*2^7 + 1*2^6 + 0*2^5 + 1*2^4 +1*2^3 + 1*2^2 + 0*2^1 + 1*2^0

              = 93

So the IP address from binary notation 11011111 10110000 00011111 01011101 to dotted decimal notation is :223.176.31.93

d) 11101111 11110111 11000111 00011101

11101111 = 1*2^7 + 1*2^6 + 1*2^5 + 0*2^4 +1*2^3 + 1*2^2 + 1*2^1 + 1*2^0

            = 239

11110111 = 1*2^7 + 1*2^6 + 1*2^5 + 1*2^4 +0*2^3 + 1*2^2 + 1*2^1 + 1*2^0

           = 247

11000111 =  1*2^7 + 1*2^6 + 0*2^5 + 0*2^4 +0*2^3 + 1*2^2 + 1*2^1 + 1*2^0

              = 199

00011101 = 0*2^7 + 0*2^6 + 0*2^5 + 1*2^4 +1*2^3 + 1*2^2 + 0*2^1 + 1*2^0

               = 29

So the IP address from binary notation 11101111 11110111 11000111 00011101 to dotted decimal notation is : 239.247.199.29

9. In order to the find the class check the first byte of the IP address which is first 8 bits and check the corresponding class as follows:                

Class A is from 0 to 127

Class B is from 128 to 191

Class C is from 192 to 223

Class D is from 224 to 239

Class E is from 240 to 255

a. 208.34.54.12

If we see the first byte of the IP address which is 208, it belongs to class C as class C ranges from 192 to 223.

b. 238.34.2.1

If we see the first byte of the IP address which is 238, it belongs to class D as Class D ranges from 224 to 239.

c. 242.34.2.8

If we see the first byte of the IP address which is 242, it belongs to class E as Class E ranges from 240 to 255.

d. 129.14.6.8

If we see the first byte of the IP address which is 129, it belongs to class B as Class B ranges from 128 to 191.

10. In order to find the class of the IP addresses in easy way, start checking bit my bit from the left of the IP address and follow this pattern:

0 = Class A

1 - 0 = Class B

1 - 1 - 0 = Class C

1 - 1 - 1 - 0 = Class D

1 - 1 - 1 - 1 = Class E

a. 11110111 11110011 10000111 11011101

If we see the first four bits of the IP address they are 1111 which matches the pattern of class E given above. So this IP address belongs to class E.

b. 10101111 11000000 11110000 00011101

If we see the first bit is 1, the second bit is 0 which shows that this is class B address as 1 0 = Class B given above.

c. 11011111 10110000 00011111 01011101

The first bit is 1, second bit is 1 and third bit is 0 which shows this address belongs to class C as 110 = Class C given above.

d. 11101111 11110111 11000111 00011101

The first bit is 1, the second bit is also 1 and third bit is also 1 which shows that this address belongs to class D.

3 0
1 year ago
Cooper Technologies is a technology company that offers many IT services in Chicago. The company's services and products include
yuradex [85]

Answer:

d. broad needs and few customers.

Explanation:

This strategy is based on creation of unique and valuable persons.

Broad needs and few customers (Wealth Management )

Wealth management is a service that combines to address the needs of clients. Wealth Management utilizes financial discipline such as financial and investment , accounting and tax.This service is appropriate for individuals with broad array of diverse needs.

4 0
2 years ago
Value is always _____________ aligned in a cell. ​
Nadya [2.5K]

Answer:

Right

Explanation:

7 0
1 year ago
A packet analyzer is a program that can enable a hacker to do all of the following EXCEPT ________. Select one: A. assume your i
bonufazy [111]

Answer:

Option (B) is the correct answer of this question.

Explanation:

Packet analyzer is a software application or set of infrastructure capable of unencrypted and recording communication that travels through a virtual system of a computer system.A packet analyzer used to detect network activity is recognized as a broadband monitoring system.

A packet analyzer is a code application that is used for monitoring, intercepting, and recording http requests with the help of a virtual interface.

Other options are incorrect because they are not related to the given scenario.

8 0
2 years ago
Other questions:
  • Jacob wants to be a Steamfitter. He just finished his associate’s degree. Which best describes what he should do next?
    10·2 answers
  • 1. Do you consider Facebook, MySpace, and LinkedIn forms of disruptive or sustaining technology? Why?
    15·1 answer
  • Deanna wants to have an exciting presentation and adds animations. She wants her bullet points to be animated through motion. Wh
    5·2 answers
  • James is an employee at the packaging unit of a chocolate factory that has come up with a new concept of packaging and marketing
    11·2 answers
  • Which of the following is true of information systems?
    15·1 answer
  • Topological sort requires only a tiny addition to the DFS algorithms. Exactly one of the following data structures is required t
    9·1 answer
  • Nicole wants to create a database to collect information about videos in her video rental store. She would like to use the datab
    9·1 answer
  • There are two methods of enforcing the rule that only one device can transmit. In the centralized method, one station is in cont
    5·1 answer
  • Write a program that takes a single integer input from the user and stores it in a variable. Your program should increase the va
    15·1 answer
  • You are a security consultant and have been hired to evaluate an organization's physical security practices. All employees must
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!