- Specify the variable assets:
...
char word[] = "anna";
long num = 6;
...
- Compile & run
- Windows (mingw)
gcc –lpthread -o thread thread.c && ./thread
- Linux (gcc)
gcc -o thread thread.c && ./thread
> 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