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
KengaRu [80]
3 years ago
5

One difference between multi-tasking using fork() versus using threads is that there is race condition among threads due to shar

ing global data. True False
Computers and Technology
2 answers:
UNO [17]3 years ago
8 0

Answer:

true

Explanation:

make me as brainliast

MAXImum [283]3 years ago
7 0

Answer:

vnn

Explanation:

You might be interested in
An extrant is designed for the exclusive use within an organization true or false
olga2289 [7]
That would be false.  The correct term is "intranet"
6 0
4 years ago
What does it mean to tweet with Geotagged
lys-0071 [83]
When tweets are geotagged, the exact position of where the person was when they posted the tweet is recorded using longitude and latitude measurements. hope this helped !
4 0
3 years ago
When do you use a for loop instead of a while loop?
creativ13 [48]

Answer:

i dont know.prob guess a short loop.

Explanation:

8 0
3 years ago
The two internal networks are using the same internal network. Does this work? Why or Why not?
lana [24]

Answer:yes

Explanation:

They are the same network

3 0
3 years ago
g 1. Write a program that asks the user for a number greater than 5 and prints all values between 1 and n that are multiples of
a_sh-v [17]

PROGRAM 1

#include <iostream>  

using namespace std;

int main() {

   int n;

   // user input taken for n

   cout<<"Enter any number greater than five: ";

   cin>>n;

   

   cout<<"The multiples of 5 between 1 to "<<n<<" are shown below."<<endl;

   

   // displaying multiples of 5 between 1 to n

   for(int h=1; h<=n; h++)

   {

       // if number is completely divisible by 5, remainder will be 0

       if( (h%5)==0)

           cout<<h<<endl;

   }

 

   return 0;

}

OUTPUT

Enter any number greater than five: 22

The multiples of 5 between 1 to 22 are shown below.

5

10

15

20

The program does not implements any input validation since this is not mentioned in the question.

User input is taken. All the multiples of 5 computed inside a for loop, and displayed to the console.

PROGRAM 2

#include <iostream>

using namespace std;

int main() {

   // variables to hold respective values

   int n;

   int sum=0;

   double avg=0;

   

   do

   {

       // user input taken for n

       cout<<"Enter any number between 1 and 100: ";

       cin>>n;

       if(n<1 || n>100)

           cout<<"Invalid number. Enter valid number."<<endl;

       cout<<""<<endl;

       

   }while(n<1 || n>100);

   

   // computing sum and average of numbers from 1 to n

   for(int h=1; h<=n; h++)

   {

       sum = sum+h;

   }

   

   avg=avg+(sum/n);

   

   cout<<"Sum of all the numbers from 1 to "<<n<<" is "<<sum<<endl;

   

   cout<<""<<endl;

   cout<<"Average of all the numbers from 1 to "<<n<<" is "<<avg<<endl;

   

   return 0;

}

OUTPUT

Enter any number between 1 and 100: 111

Invalid number. Enter valid number.

Enter any number between 1 and 100: 0

Invalid number. Enter valid number.

Enter any number between 1 and 100: 23

Sum of all the numbers from 1 to 23 is 276

Average of all the numbers from 1 to 23 is 12

The program not implements any input validation since this is mentioned in the question.

User input is taken inside do-while loop till valid input is obtained.

The sum of all numbers from 1 to n computed inside a for loop, average computed outside for loop.

Both values are displayed to the console.

5 0
3 years ago
Other questions:
  • A friend complains that she is always running out of money even though she “never buys anything expensive.” What advice would yo
    10·1 answer
  • To make sure that you do not get too tired when typing for long periods, how often should you get up and stretch? Every 15 minut
    9·1 answer
  • The RESET circuit used on the four 3-Bit Counters analyzed in this activity reset the counts to zero (000). It makes sense for t
    14·1 answer
  • Gabriel needs to create a formula that does not change when it is copied to cell b2. which formula should he create?
    14·1 answer
  • Plzzz help! It’s due soon and I can’t figure it out
    13·1 answer
  • Use the following scale to rate yourself: (There is no wrong answer
    8·1 answer
  • Is MOOC's potentially harmful to copyright? Why or why not ?
    13·1 answer
  • State the keyboard key used to move the cursor to the line​
    10·1 answer
  • Write a python code for a calculator
    8·2 answers
  • How are most databases organized?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!