#include<pthread.h>
#include<stdio.h>

void *entry(void *arg)
{
   char *s = (char *)arg;

   while (1) {
      printf("Hello from %s: %p\n", s, &arg);
      sleep(1);
   }
}

int main(int argc)
{
   pthread_t id1, id2;

   pthread_create(&id1, NULL, entry, "Thread 1");
   pthread_create(&id2, NULL, entry, "Thread 2");

   while (1) {
      printf("Hello from main: %p\n", &argc);
      sleep(1);
   }

   return 0;
}