Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Linux ( and C++) Construct an array of 1000 random integers within range [0, 100]. An input file input.txt is provided. Each line of

In Linux ( and C++)

Construct an array of 1000 random integers within range [0, 100]. An input file input.txt is provided. Each line of input.txt is a query integer that you need to check how many of that number is in your random integer array. For each query integer, fork a new child process to do the counting. The output is for each input query, output the count and child process id. For example:

$> query: 13 count: 5 pid: 13342

$> query: 22 count: 3 pid: 13357

input.txt 5 13 24 6 17 20 1 51 36 42 2 19 67 35 64 91 96 84 72

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

How did Socrates challenge the relativism of Protagoras?

Answered: 1 week ago