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
elena-s [515]
3 years ago
10

Unit 2: Lesson 6 - Coding Activity 1

Computers and Technology
1 answer:
gogolik [260]3 years ago
4 0

Answer:

easyy

Explanation:10 smaple runs and 2

You might be interested in
Write a multi-threaded program that outputs prime numbers. The program should work as follows: the user will run the program and
Ierofanga [76]

Answer:

The programming code can be found in the explanation part, please go through it.

Explanation:

Code:

#include<stdio.h>

#include<stdlib.h>

#include <pthread.h>

// function check whether a number

// is prime or not

int isPrime(int n)

{

// Corner case

if (n <= 1)

return 0;

// Check from 2 to n-1

for (int i = 2; i < n; i++)

if (n % i == 0)

return 0;

return 1;

}

void* printPrimes(void *vargp)

{

int *n = (int *)vargp;

int i=0;

for (i=2;i<=n;i++)

{

if (isPrime(i)) printf("%d\n", i);

}

}

// Driver Program

int main(int argc, char* argv[])

{

int n = atoi(argv[1]);

pthread_t tid;

pthread_create(&tid, NULL, printPrimes, (void *)n);

pthread_exit(NULL);

return 0;

}

4 0
3 years ago
A _is a short descriptive label that you assign to webpages, photos,
Nitella [24]
Looks like you already answered your question? It’s the a tag ()
5 0
2 years ago
Nat is defined in rfc ____, which describes methods for connecting private (internal) ip addresses to the internet.
algol13
Describing methods for connecting private (internal) IP addresses to the internet using NAT was defined in RFC 3022. NAT has servers that use port forwarding to send connections from external clients to the Web server on the internal network. NAT is used on routers to hide internet IP address from the internet.



7 0
3 years ago
________ is used to undo unwanted database changes.
riadik2000 [5.3K]
Backward Recovery would be the answer.

(:
5 0
3 years ago
Read 2 more answers
A recently promoted employee at your company has called you because they attempted to log in to their computer several times wit
oksano4ka [1.4K]

Answer:

The user's account is blocked due to several unsuccessful login attempts.

Explanation:

Any device having a password security has a property of blocking the account or device in use after noticing several unsuccessful attempts of login.

So as a precautionary measure when the software notices such activity it blocks the access to that account so that any intruder might not be able to enter the account premises.

Same is the case with the employee who was trying to access his own account but due the expired password he made several attempts but couldn't log in. The software took it as an intruder and blocked the account.

The employee after requesting for password reset again tried to login but the account was blocked so he could not be able to access it again.

7 0
3 years ago
Other questions:
  • User accounts will be locked out after authentication is attempted
    7·1 answer
  • When recording data on a multiple-disk storage system, should we fill a complete disk surface before starting on another surface
    6·1 answer
  • Manuel is working on a project in Visual Studio. He wants to keep this program showing on the entire desktop, but he also needs
    7·1 answer
  • Objective:This assignment is designed to give you experience with thinking about algorithm analysis and performanceevaluation.Pr
    11·1 answer
  • Which of the following statements is false? a. Each object of a class shares one copy of the class's instance variables. b. A cl
    11·1 answer
  • Helena purchased a security software package to protect her new laptop against threats such as spyware and computer viruses. she
    14·1 answer
  • What are the binary symbols?
    5·2 answers
  • Which of the following statements is false? People tend to shortcut security procedures because the procedures are inconvenient.
    13·1 answer
  • Neymar machine that Run on electricity
    11·1 answer
  • Which of the following is a property of TCP?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!