- Explain in your own words the following code:
#include<pthread.h>
#include <stdio.h>
int value;
void *my_thread(void*param);
main (int argc, char *argv[])
{pthread_t tid; int retcode;
//what does thisdo
if (argc != 2) {
fprintf(stderr, “usage: a.out <integer value>n”);
exit(0);
}
//what does thisdo
retcode =pthread_create(&tid,NULL,my_thread,argv[1]);
//what does this do
if (retcode != 0) {
fprintf (stderr, “Unable to create threadn”);
exit (1);
}
// What does thisdo
pthread_join(tid,NULL);
printf (“I am the parent: Square = %dn”, value);
} //main
// What does thisdo
void *my_thread(void *param)
- {
int i = atoi (param);
printf (“I am the child, passed
PayPal Gateway not configured
PayPal Gateway not configured