Computers and Technology
16.02.2023 18:27
274
500
9
Solved by an expert

Which sentence correctly describes a characteristic of a CPU? Select the correct

Which sentence correctly describes a characteristic of a CPU? Select the correct text in the passage. (A)The speed of a processor is measured in seconds.
(B) Processors that have multiple cores do not support parallel processing.
(C) Hyper-threading is the use of multiple processors to run multiple threads.
(D) Processors can support both 32- and 64-bit architecture.
(E) Integrated CPUs do not process graphics and videos.
Show Answers
tommyaberman
tommyaberman
4,9(75 marks)

#include <stdio.h>

#include <time.h>

int main()

{

 

clock_t start, end;

double cpu_time_used;

 

//starting the cpu clock.

start = clock();

 

for(int i=0; i<10000; i++){

my_func_with_only_subscript();    

}

 

// closing the cpu clock.

end = clock();

 

// calculating time elapsed in secs.

cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;

 

printf("Time taken with subscript references::%f\n",cpu_time_used);

 

// starting the cpu clock

start = clock();

 

for(int i=0; i<10000; i++){

my_func_with_pointers();

}

 

// closing the cpu clock.

end = clock();

 

// calculating the time elapsed in array reference through pointers.

cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;

 

printf("Time taken with pointers::%f\n",cpu_time_used);

 

return 0;

}

// function to reference the 2D array through subscripts.

void my_func_with_only_subscript()

{ //assuming that the usage of

int arr[15][5] = {0}; //square matrice is not mandatory

for(int j=0; j<5 ; j++){

for(int i=0; i<15; i++){

arr[i][j]; //no operation is done, only accessing the element

}

}

return;

}

// function to reference the 2D array through pointers.

void my_func_with_pointers()

{ //assuming that the usage of

int arr[15][5] = {0}; //square matrice is not mandatory

for(int j=0; j<5 ; j++){

for(int i=0; i<15; i++){

*(*(arr+i)+j); //no operation is done, only accessing the element

}

}

return;

}

/******************************************************************************************************************************/

OUTPUT

[Attached in the attachments]


Write a C program that does a large number of references to elements of two-dimensioned arrays, usin

Popular Questions about the subject: Computers and Technology

During 2012, jasmine (age 12) received $2,400 from a corporate bond. she also...
Computers and Technology
12.05.2023 08:37
What number would the formula =COUNT(A2:A7) return?...
Computers and Technology
06.08.2022 22:10
What are 6 subtopics on computer programming ?...
Computers and Technology
24.03.2021 04:49
The Symmetrical Difference geoprocessing operation will: a. Preserve all the...
Computers and Technology
20.01.2020 18:42
An IT company uses a tool to inspect individual packets on their client’s networks....
Computers and Technology
23.12.2022 17:28
You run HeatMapper on a client s network to get a visualization of the radio...
Computers and Technology
08.11.2020 04:58
What is a glass tube containing electrodes used as a switch to produce on or...
Computers and Technology
05.01.2021 17:55
How will Artificial intelligence impact the future of Cyber Crime? What will...
Computers and Technology
15.07.2020 11:20
I should have leveled up on by now, does this take time or is this a glitch (pic...
Computers and Technology
12.03.2023 13:29
Enter the matrices C and I into MATLAB C = [0.25 0.15 θ.28 θ.18 θ.17 0.05; 0.22...
Computers and Technology
29.01.2021 01:28

New questions by subject

The jones family traveled 314 miles each day until they reached their destination,...
Mathematics
03.09.2020 22:16
What does the quote time is to history as space is to geography mean...
History
22.12.2021 09:48
If f(x) = -2x + 3 and g(x) = 4x - 3, which is greater, f(5) or g(-2)? a. f(5)...
Mathematics
08.04.2023 04:13
Which of these is a way to stay safe during exercise? a: warm up first b : stay...
Health
16.09.2021 14:43
Solve the following equation -4y + 8 = 4(2y - 2) - 2(-16 + 8y)y = -4y = 4y =...
Mathematics
18.09.2021 19:58
What is the theme of the stolen party...
English
15.05.2022 07:12
Which of the following would most likely contain carbon?...
Biology
05.11.2020 20:22
What was causing economic booms in the north and south...
History
17.04.2021 09:03
Which is the site of the light-dependent reactions of photosynthesis?...
Biology
02.04.2023 12:37
The following equation shows the correct molecules formed in the reaction, but...
Chemistry
03.11.2021 23:08
#
#
#
#
# #

We expand our knowledge with many expert answers