Source

cil-template / test / tut3.c

//@highlight \section{\texttt{test/tut3.c}}
//@highlight \hltscom{The result of the analysis in \ttt{tut3.ml} will be to
//@highlight    print a message to the console for each variable of integral
//@highlight    type wherever it is used indicating whether it is even or odd
//@highlight    at that program point. We consider the results of the analysis
//@highlight    on the code below:}
//@highlight \hlbegincode{}

#include <stdio.h>

int main()
{
  int a,b,c,d;
  a = 1; b = 2; c = 3; d = 4;
  a += b + c;
  c *= d - b;
  b -= d + a;
  if (a % 2) a++;
  printf("a = %d, b = %d, c = %d, d = %d\n", a, b, c, d);
  return 0;
}
//@highlight \hlendcode{}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.