#include <stdio.h>
#include <sys/types.h>
#define MAX_COUNT 200
void ChildProcess(void); /* child process prototype */
void ParentProcess(void); /* parent process prototype */
void main(void)
{
pid_t pid;
pid = fork();
if (pid == 0)
{ int x1= 112;
float x2 = 10.4;
printf("the address is %p x1\n",&x1);
printf("the address is %p x2\n",&x2);
ChildProcess();}
else
{float x3 =45.5;
float x4 = 10.4;
printf("the address is %p x3\n",&x3);
printf("the address is %p x4\n",&x4);
ParentProcess();}
}
void ChildProcess(void)
{
printf(" *** Child process ***\n");
}
void ParentProcess(void)
{
printf("*** Parent*****\n");
}