SUBJECT: SOFTWARE ENGINEERING Read the following code carefully and perform the following tasks: Draw Control Flow Graph for the given code Highlight all regions in the flow graph separately Using...


SUBJECT:
SOFTWARE ENGINEERING


Read the following code carefully and perform the following tasks:



  1. Draw Control Flow Graph for the given code

  2. Highlight all regions in the flow graph separately

  3. Using cyclometic complexity formula, calculate number of basis path

  4. Show path of each basis path test


#include <pthread. h><br>#include <stdio.h><br>int value<br>0;<br>void *runner (void *param);<br>/* the thread<br>* /<br>int main (int argc,<br>char *argv[])<br>{<br>int pid;<br>pthread.t tid;<br>pthread attr.t attr;<br>pid<br>fork ();<br>if (pid<br>pthread attr.init (&attr);<br>pthread.create (&tid, &attr,runner,NULL);<br>pthread.join(tid,NULL);<br>printf(
wait (NULL); printf (" PARENT: value } 0) {/* child process * / == %d",value); /* LINE C */ 0) {/* parent process * / %d", value); /* LINE P * / void *runner (void *param) { value = 5; pthread exit (0); "/>
Extracted text: #include #include int value 0; void *runner (void *param); /* the thread * / int main (int argc, char *argv[]) { int pid; pthread.t tid; pthread attr.t attr; pid fork (); if (pid pthread attr.init (&attr); pthread.create (&tid, &attr,runner,NULL); pthread.join(tid,NULL); printf(" CHILD: value } else if (pid > wait (NULL); printf (" PARENT: value } 0) {/* child process * / == %d",value); /* LINE C */ 0) {/* parent process * / %d", value); /* LINE P * / void *runner (void *param) { value = 5; pthread exit (0);

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here