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;
}
Answer:
at the bottom of the web page
Explanation:
Ben is creating a web page content for the gaming gadget that has been newly launched. He uses hyperlinks so that the visitors can navigate the web pages properly which deals with some other electronic gadgets also. So Ben should place the hyperlinks at the bottom of the web page as it will provide anyone viewing the web pages easily.
Answer:
Negligence
Explanation:
Under the theory of liability, a complainant can file a lawsuit on the basis of negligence, of which borders on the failure of one to exercise his or her legal obligation either by omission or commission.
The guest who is severely injured after allegedly slipping on some liquid on the floor of my restaurant can file a lawsuit to hold me liable for his injury because of failure to ensure safety of guests in my restaurant.