You will be given a ID as a input to a process. We need to find if its a PID or TID This ID can be of any process not necessary of the same process. For example:
.\a.out 1234
Output: its a Thread ID.
I need to get the same info im my program. If I do
ps -elf | 1234
it will list all entries with the given ID. The Entry with PID and TID are same is a process and if those are different then its a thread. I want to do the same through C program