Question: Draw the control flow graph for the printPrimes(int) function below. Augment your CFG (control flow graph) with all defs and uses. Do not add statements
Draw the control flow graph for the printPrimes(int) function below. Augment your CFG (control flow graph) with all defs and uses. Do not add statements from the code into your CFG just the defs and uses.

Exercise 1: Control Flow Graphs Draw the control flow graph for the printPrimes(int) function below. Augment your CFG (control flow graph) with all defs and uses. Do not add statements from the code into your CFG, just the defs and uses. private static void printPrimes (int n) int curPrime; int numPrimes; boolean isPrime; int [] primes = new int [MAXPRIMES); // The list of prime numbers. // Value currently considered for primeness / Number of primes found so far / Is curPrime prime? / Initialize 2 into the list of primes. primes [O] 2; numPrimes 1 ; curPrime = 2; while (numPrimes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
