Personal tools
You are here: Home Courses CS453 Automated SW Testing, Fall 13 HW2 Example.c

Example.c

Example.c — C source code, 479 bytes

File contents

//Example.c
#include <stdio.h>

int globalVariable;

void myPrint(int param) {
  if (param == 1)
    printf("param is 1");
  for(int i = 0 ; i < 10 ; i++ ) {
    globalVariable += i;
  }
}

int main(int argc, char *argv[]) {
  int param = 1;
  myPrint(param);
  return 0;
}

/*
Output (a list of branches in this file):

function: myPrint
        If      ID: 0   Line:  7        Col: 3
        For     ID: 1   Line:  9        Col: 3
function: main
Total number of branches: 4
*/
Document Actions