Question: Write a program in C which creates 5 POSIX threads. These threads must individually generate arrays of 2.000 random integers between 0 and 50.000 (inclusive)
Write a program in C which creates 5 POSIX threads. These threads must individually generate arrays of 2.000 random integers between 0 and 50.000 (inclusive) and classify these integers according to their number of digits. Sample Run $ ./program1 Thread 0: 1-9: 0, 10-99: 7, 100-999: 34, 1000-9999: 358, 10000-99999: 1601 Thread 2: 1-9: 0, 10-99: 5, 100-999: 38, 1000-9999: 366, 10000-99999: 1591 Thread 3: 1-9: 0, 10-99: 2, 100-999: 35, 1000-9999: 373, 10000-99999: 1590 Thread 1: 1-9: 0, 10-99: 2, 100-999: 24, 1000-9999: 356, 10000-99999: 1618 Thread 5: 1-9: 1, 10-99: 5, 100-999: 45, 1000-9999: 346, 10000-99999: 1603
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
