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
Marina86 [1]
3 years ago
5

I am getting two expected errors on this code for the bottom two “public static void” lines. Can someone tell me how I can fix i

t? Thanks

Computers and Technology
1 answer:
AVprozaik [17]3 years ago
7 0

Answer:

Declare variable b in both lines

i.e. int b

Explanation:

In the given code, the parameters of both functions were not properly declared.

When listing the parameters, the data type must be clearly stated for all parameters (individually)

In the declaration of both functions, only variable a is declared as integer while b is undeclared.

So, the correction is to declare b as integer

You might be interested in
When you are saving a file, what does word suggest by default as the name of the document?
LenaWriter [7]
Whatever you have written on the page is what it'll name it.
5 0
3 years ago
Read 2 more answers
Is there an answer to these picture?
Tomtit [17]

Answer:

yes there is an answer to this question

6 0
3 years ago
Which of the following is NOT a place where you are likely to encounter a pedestrian?
AlexFokin [52]

Answer:

A. On a highway

Explanation:

On a highway is NOT a place where you are likely to encounter a pedestrian.

Pedestrians found on highways usually get arrested or get a ticket.

3 0
3 years ago
Read 2 more answers
Lots of data can be transferred in short time, when we have,
dusya [7]

Answer: B. Higher Bandwidth

8 0
3 years ago
Read 2 more answers
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
Other questions:
  • Which statement describes what happens if multiple users make changes simultaneously to a presentation when
    10·1 answer
  • What is the purpose of the BBC option in a email?
    7·1 answer
  • Why you should care about copyright
    13·1 answer
  • What is online school like 3 sentences
    8·2 answers
  • A ____ object is used to hold data that is retrieved from a database via the OleDbDataAdapter connection. a. DataRecord b. DataS
    12·2 answers
  • What is a stored​ procedure?
    8·1 answer
  • Does anyone know what the name of the game is, where you click on the grey dots in a 3x3 grid and try to make them all the same
    10·1 answer
  • Jenis jenis perangkat keras?
    14·1 answer
  • The digital revolution has affected a. almost all areas of movie-making, except makeup and hairstyling. b. only a small number o
    5·1 answer
  • Suppose you are asked to design a rotating disk where the number of bits per track is constant. You know that the number of bits
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!