Home
  Contact
  Short Vita
  Research
  Teaching
  LSDIS Lab
  Links

UGAVAC Examples

All students

Example 1-a illustrates the translation of the sample1.c program from the Micro-C handout.

Example 1-b illustrates the translation of the modified sample1.c program from the Micro-C handout. The modification introduces two float variables. The expressions involve operands of mixed types.

Example 2-a illustrates the translation of the sample2.c program from the Micro-C handout.

Example 2-b illustrates the translation of the modified sample2.c program from the Micro-C handout. The modification introduces a global variable sum.

Example 3 contains a simple recursive calculation of the factorial function.

Graduate students only

Example 4 includes again the factorial function, but this time the computed value is returned via a reference parameter.

Example 5 includes a simple sorting program, illustrating the use of arrays and their translation.