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
Sonbull [250]
4 years ago
11

What does the following statement do? double[] array1 = new double[10]; A. Declares array1 to be a reference to an array of doub

le values B. Creates an instance of an array of 10 double values C. Will allow valid subscripts in the range of 0 - 9 D. All of the above
Computers and Technology
1 answer:
Crank4 years ago
7 0

Answer:

The answer is "Option D".

Explanation:

In the given code an array that is "array1" is declared that stores double value because its data type is double. This array stores 10 element, that is equal, and between 0 to 9, because array indexing always starts from 0. In the given array declaration code all options are correct, that can be described as follows:

  • In option A, It is correct, because all element stores double value.
  • In option B, It is correct, because the size of the array is 10.
  • In option C, It is also correct, because it ranges between 0 to 9.
You might be interested in
The dlci field in the frame relay header is _________ bits long.
ycow [4]
6 or 10-bit length

DLCI (Data Link Connection Identifier) is the essence of the Frame Relay Header. This value length represents the virtual connection between the DTE and the switch. The DLCI values are unique only to the physical channel on which they reside and thus, maintaining local significance only.



4 0
3 years ago
The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
Llana [10]

Answer:

// Producer Thread

void *producer(void *param) {

buffer_item item;

while (true) {

item = rand() % 100;

sem_wait(&empty);

pthread_mutex_lock(&mutex);

if (insert_item(item))

printf("Can't insert item\n");

else

printf("Producer %d: produced %d\n", *((int*)param), item);

pthread_mutex_unlock(&mutex);

sem_post(&full);

}

}

// Consumer Thread

void *consumer(void *param) {

while (true) {

buffer_item item = NULL;

if (in > 0)

item = buffer[in - 1];

sem_wait(&full);

pthread_mutex_lock(&mutex);

if (remove_item(&item))

printf("Can't remove item\n");

else

printf("Consumer %d: consumed %d\n", *((int*)param), item);

pthread_mutex_unlock(&mutex);

sem_post(&empty);

}

}

Explanation:

An outline of the producer and consumer threads appears as shown above.

3 0
3 years ago
Henri is working in a complex financial spreadsheet that has hundreds of columns of data. If he is at column AN and would like t
Alisiya [41]
Answer: Contro; + Home

This key combination will return you to the first row, first column of the current worksheet.
8 0
3 years ago
suppose you need to verify how to correctly use commas. you pen your English textbook and scan the chapter titles in which one w
Leviafan [203]
D- Proper punctuation
6 0
3 years ago
With a(n) ____ structure, you perform an action or task, and then you perform the next action in order.
e-lub [12.9K]
The answer is a <u>sequence structure</u>
8 0
3 years ago
Other questions:
  • What does subscribing to a website’s RSS feed provide to a subscriber?
    10·1 answer
  • What does “int” means in php code
    13·1 answer
  • What is the term for the conversion of a bitmap image to a vector image?
    8·1 answer
  • Advantages of purchasing a software package over developing software in-house include all of the following except ____. Group of
    13·1 answer
  • Unemployment can be viewed as
    14·1 answer
  • Credence is a student in college.
    13·2 answers
  • a term to describe article that can be displayed in their entirety as opposed to abstract and reference only?​
    10·1 answer
  • A computer is assigned an IP address of 169.254.33.16. What can be said about the computer, based on the assigned address?
    9·1 answer
  • Because all the IEEE WLAN features are isolated in the PHY and ____________ layers, practically any LAN application will run on
    11·1 answer
  • Edhesive 3.4 practice 1
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!