Anyone can tell me how to do this question:

A program that creates an array of 5 student names and an array of 5 student Ids. You can choose to input the values or directly assign them. The program should then create two threads. The first created thread executes a loop that displays all the names, while the second thread should execute a loop displaying the ids. In the mean time the parent thread should sleep for 5 seconds, then display “Parent Thread Exiting” and then exits.

So going from a meager understanding of scanf to posix threads.

Please specify which platform. Windows does not support Posix threads natively, and Linux and Mac do not support Windows threads at all.

i will be using linux terminal

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.