Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 540 Bytes

Readme.md

File metadata and controls

36 lines (29 loc) · 540 Bytes

Threading

Usage

  1. Specify the variable assets:
...
char word[] = "anna";
long num = 6;
...
  1. Compile & run
    • Windows (mingw)
    gcc –lpthread -o thread thread.c && ./thread
    • Linux (gcc)
    gcc -o thread thread.c && ./thread

Example Outputs

> Waiting for threads to finish (pthread join)
> anna - Is palindrome
> 6 - Is a perfect number
> Waiting for threads to finish (pthread join)
> hello - Is not palindrome
> 100 - Is not a perfect number