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
Luden [163]
4 years ago
12

Using the following code, answer the following questions

Computers and Technology
1 answer:
mina [271]4 years ago
6 0

Answer:

Answer explained

Explanation:

as PI 3 B+ is quadcore processor(i.e. 4 cores)

omp_get_thread_num() is used for getting thread number.(i.e. 0,1,2,3)

omp_get_num_threads() is used for getting number of threads.(i.e. 4)

1. Output should be,

Hello from thread 0 of 4

Hello from thread 1 of 4

Hello from thread 2 of 4

Hello from thread 3 of 4

2. #pragma omp parallel is used to fork(create child) additional threads to carry out the work enclosed in the construct in parallel.

3. We can Compile this code using,

  gcc -o omp_helloc -fopenmp hello.c

4. We can Run this code using,

   ./hello

5.omp_get_num_threads() is used for getting number of threads.(i.e. 4)

You might be interested in
What are some principles of Programming?​
adelina 88 [10]

Answer:

1: Don't repeat yourself (DRY).

2: Keep it simple (KISS)

3. Minimize Coupling

4. Maximize Cohesion

5. Hide Implementation Details

6. Law of Demeter

7: Open/Closed Principle

Explanation:

1. Avoiding repetition is probably the single most fundamental tenet in programming.

2. Simplicity should always be a key goal. Simple code takes less time to write, has fewer bugs, and is easier to modify.

3. Any section of code (code block, function, class, etc.) should minimize the dependencies on other areas of code. This is achieved by using shared variables as little as possible.

4. Code that has similar functionality should be found within the same component.

5. Hiding implementation details allows change to the implementation of a code component while minimally affecting any other modules that use the component.

6. Code components should only communicate with their direct relations (e.g. classes that they inherit from, objects that they contain, objects passed by argument, etc.)

7. Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification. In other words, it is not recommended to write classes that people can modify, write classes that people can extend.

I hope this helps and I'm sorry if it doesn't.

Have a great day! :)

8 0
3 years ago
CSDL: S, P, SP hãy:
fomenos

Answer:

bvghhhhjbhjjhzzsjggjhgfeht275&+jxf ff jdffgfkhjjhgdgghfhkjjhhggkjhgf

Explanation:

Tên mặt hàng không có màu xanh

2. Mã của các mặt hàng được bán bởi nhà cung cấp có mã là 'S1'

3. Tên mặt hàng được bán bởi nhà cung cấp có mã là 'S1'

4. Tên mặt hàng được bán bởi nhà cung cấp có mã là 'S1' và có xuất xứ ở Hà Nội

5. Tên nhà cung cấp có bản mặt hàng mà có giá trong khoảng 50-100Tên mặt hàng không có màu xanh

2. Mã của các mặt hàng được bán bởi nhà cung cấp có mã là 'S1'

3. Tên mặt hàng được bán bởi nhà cung cấp có mã là 'S1'

4. Tên mặt hàng được bán bởi nhà cung cấp có mã là 'S1' và có xuất xứ ở Hà Nội

5. Tên nhà cung cấp có bản mặt hàng mà có giá trong khoảng 50-100Tên mặt hàng không có màu xanh

2. Mã của các mặt hàng được bán bởi nhà cung cấp có mã là 'S1'

3. Tên mặt hàng được bán bởi nhà cung cấp có mã là 'S1'

4. Tên mặt hàng được bán bởi nhà cung cấp có mã là 'S1' và có xuất xứ ở Hà Nội

5. Tên nhà cung cấp có bản mặt hàng mà có giá trong khoảng 50-100Tên mặt hàng không có màu xanh

2. Mã của các mặt hàng được bán bởi nhà cung cấp có mã là 'S1'

3. Tên mặt hàng được bán bởi nhà cung cấp có mã là 'S1'

4. Tên mặt hàng được bán bởi nhà cung cấp có mã là 'S1' và có xuất xứ ở Hà Nội

5. Tên nhà cung cấp có bản mặt hàng mà có giá trong khoảng 50-100Tên mặt hàng không có màu xanh

2. Mã của các mặt hàng được bán bởi nhà cung cấp có mã là 'S1'

3. Tên mặt hàng được bán bởi nhà cung cấp có mã là 'S1'

4. Tên mặt hàng được bán bởi nhà cung cấp có mã là 'S1' và có xuất xứ ở Hà Nội

5. Tên nhà cung cấp có bản mặt hàng mà có giá trong khoảng 50-100

5 0
3 years ago
Read 2 more answers
Wanna join a pad let anyoone
aleksandr82 [10.1K]

Answer: you do not use Brainly for this

Explanation: And no

7 0
3 years ago
Read 2 more answers
What is the purpose of entering the command ip nat inside source static tcp 192.168.10.2 80 209.165.200.223 8080 at the global c
vlabodo [156]

Answer: See below.

Explanation: It binds the inside local address and local port to the specified inside global address and global port.

7 0
2 years ago
What is the main Importance of internet?<br><br>​
rodikova [14]

Answer:

By utilizing the internet, people are able to progress in almost all spheres of life. As it's a worldwide organization of the computer network, it can link people from all over and create communities. It's a great way of providing and accessing information and is available almost all over the world.

6 0
3 years ago
Read 2 more answers
Other questions:
  • What is the decimal number of binary number 1101011 if the binaryis represented as a(n)
    15·1 answer
  • Please help! I'll give you a medal!
    13·1 answer
  • Which of the following is the key benefit is offered by the Internet channel? Group of answer choices Deeper assortments Immedia
    7·1 answer
  • Write a recursive function sumSquares(num) that given an integer num, returns the sum of squares of numbers from 1 to num. For e
    12·1 answer
  • What are the uses of the tracrt and ping commands and what information is provided by each.
    11·1 answer
  • To format a picture to look like a sketch or a painting you can add a(an)
    13·1 answer
  • Is computing gcse easy or hard
    10·2 answers
  • State whether True / False:<br>The pause option stops the recording temporarily.*<br>True<br>False​
    9·1 answer
  • Fill in the black
    8·1 answer
  • Big data are _____. Select 2 options. (please help!)
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!