Question: ANSWER NEED ASAP!! Q#1 Read the following code carefully and perform the following tasks: a. Draw Control Flow Graph for the given code b. Highlight

ANSWER NEED ASAP!!

Q#1 Read the following code carefully and perform the following tasks:

a. Draw Control Flow Graph for the given code

b. Highlight all regions in the flow graph separately

c. Using cyclometic complexity formula, calculate number of basis path tests.

d. Show path of each basis path test separately.

ANSWER NEED ASAP!! Q#1 Read the following code carefully and perform the

#include #include int value = 0; void *runner (void *param); /* the thread */ int main(int arge, char *argv[]) { int pid; pthread_t tid; pthread.attr.t attr; pid fork(); if (pid == 0) {/* child process */ pthread_attr_init(&attr); pthread.create(&tid, &attr, runner, NULL); pthread_join(tid, NULL); printf ("CHILD: value = %d", value); /* LINE C */ } else if (pid > 0) {/* parent process */ wait (NULL); printf ("PARENT: value - %d", value); /* LINE P */ } > void *runner (void *param) { value = 5; pthread exit(0); } #include #include int value = 0; void *runner (void *param); /* the thread */ int main(int arge, char *argv[]) { int pid; pthread_t tid; pthread.attr.t attr; pid fork(); if (pid == 0) {/* child process */ pthread_attr_init(&attr); pthread.create(&tid, &attr, runner, NULL); pthread_join(tid, NULL); printf ("CHILD: value = %d", value); /* LINE C */ } else if (pid > 0) {/* parent process */ wait (NULL); printf ("PARENT: value - %d", value); /* LINE P */ } > void *runner (void *param) { value = 5; pthread exit(0); }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!