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
Sergeu [11.5K]
2 years ago
6

Please help!!

Computers and Technology
1 answer:
Lera25 [3.4K]2 years ago
8 0
A is the correct answer
You might be interested in
Print "Censored' if userlnput contains the word "darn, else print userlnput. End with newline. Ex: If userinput is "That darn ca
sasho [114]

Answer:

The code is given below in Java with appropriate comments

Explanation:

//Import the input.

import java.util.Scanner;

class CensoredWords

{

    //Define the main method.

    public static void main(String args[ ])

    {

         //Define the variables.

         String userInput="" ;          

         //Define the scanner object

         Scanner scobj = new Scanner(System.in);

          //Accept the userInput.

         System.out.print("Enter String: ");

         userInput=scobj.nextLine();

         //Check if the input contains darn.

         //Print censored.

         if(userInput.toUpperCase().indexOf("DARN") != -1)

         System.out.printf("Censored");

         //IF the input does not contains darn

         //Print userInput.

         else

System.out.printf(userInput)

         return;

}

}

6 0
3 years ago
In an office there is a unisex bathroom with n toilets. The bathroom is open to both men and women, but it cannot be used by men
Gnesinka [82]

Answer:

Check the explanation

Explanation:

#include <stdio.h>

#include <stdlib.h>

#include <pthread.h>

#include <semaphore.h>

int mcount,wcount;

sem_t x,y,z,wsem,msem,cap;

void delay(void)

{

int i;

int delaytime;

delaytime = random();

for (i = 0; i<delaytime; i++);

}

void *woman(void *param)

{

sem_wait(&z);

sem_wait(&wsem);

sem_wait(&y);

wcount++;

if(wcount==1)

{ sem_wait(&msem); }

sem_post(&y);

sem_post(&wsem);

sem_post(&z);

sem_wait(&cap);

printf("woman in!\n");

delay();

printf("\twoman out!\n");

sem_post(&cap);  

sem_wait(&y);

wcount--;

if(wcount==0)

{ sem_post(&msem); }

sem_post(&y);

}

void *man(void *param)

{  

sem_wait(&z);

sem_wait(&msem);

sem_wait(&x);

mcount++;

if(mcount==1)

{ sem_wait(&wsem); }

sem_post(&x);

sem_post(&msem);

sem_post(&z);

sem_wait(&cap);

printf("\t\tman in!\n");

delay();

printf("\t\t\tman out!\n");

sem_post(&cap);

sem_wait(&x);

mcount--;

if(mcount==0)

{sem_post(&wsem);}

sem_post(&x);

}

int main(void)

{

int i;

srandom(60);

mcount = 0;

wcount = 0;

sem_init(&x,0,1); // for sem_init, initial value is 3rd argument

sem_init(&y,0,1);

sem_init(&z,0,1);

sem_init(&wsem,0,1);

sem_init(&msem,0,1);

sem_init(&cap,0,4); // eg. cap initialized to 4

pthread_t *tid;

tid = malloc(80*sizeof(pthread_t));

// You can use your cobegin statement here, instead of pthread_create()  

// I have forgone the use of pthread barriers although I suppose they would nicely imitate the functionality of cobegin.

// This is merely to retain simplicity.

for(i=0;i<10;i++)

{

pthread_create(&tid[i],NULL,woman,NULL);

}

for(i=10;i<20;i++)

{  

pthread_create(&tid[i],NULL,man,NULL);

}

for(i=0;i<20;i++)

{  

pthread_join(tid[i],NULL);

}

return(0);

}

5 0
3 years ago
Difference between a software package and Integrated software and why users would choose one over the other
ivolga24 [154]

Answer:

Software Package means software which is used collectively, implements alike purposes, or combines alike characteristics and is bundled collectively being one kit from software applications, where as, Integrated software is a combination of software specifically built to operate on almost linked applications.

Explanation:

Users should choose Software Package because of the following reasons:

  • Cheap price compared over buying individual application independently.
  • Opportunity to introduce the total of the applications at the corresponding period or just that applications you require to work.
  • The compatible user interface of individual application over another.
  • The facility to distribute data among applications.
  • Coming updates can refresh every application whole by the corresponding event.
  • Perfect for individual use, licensed use, huge or little company.
  • Every software holds the full-featured transcription.
5 0
2 years ago
A state university locks in costs for a student once a student starts attending the university. The total cost is $24,500. A stu
zlopas [31]
10,700+5000+1600=17,300
24,500-17,300=7,200
7,200/10=
$720.00 will need to be saved every month.
6 0
3 years ago
Read 2 more answers
In Microsoft Word, when you highlight existing text you want to replace, you are in
Lina20 [59]
The correct answer is C. Typeover mode

This is when you select a text and can then type over it and it automatically replaces it with what you're writing. It also creates a little box that lets you edit the selected part easily if that's what you need with things like bold or italic or change the text color.
4 0
3 years ago
Other questions:
  • On computer X, a nonpipelined instruction execution would require 12 ns. A pipelined implementation uses 6 equal-length stages o
    9·1 answer
  • An essential skill today is knowing how to cite sources properly. Creative Commons has a system of licenses and tools for creato
    11·1 answer
  • Data warehousing and data mining mean the same thing when applied to CRM
    7·2 answers
  • The maximum number of colors that should be used on a slide is _____. 2 4 6 8
    5·1 answer
  • Please write a code for below:
    9·1 answer
  • What is the maximum input current fr transformer T10266
    10·1 answer
  • What is one of the benefits of using templates for your email marketing campaigns?
    10·1 answer
  • Why is population composition by age important give reason​
    13·1 answer
  • What is a computer and what is the work of it​
    5·2 answers
  • What are benefits of AI
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!