This is an old revision of the document!
The focus of this effort is to provide interesting and particularly-focused challenges that will help the evolving programmer reach into the niches needed for accelerated comprehension and practice, along with information helpful to that end. A few notable things to know about my particular approach:
Here are the locations of existing free tutorial content that I have reviewed, and seen fit to refer to:
The first portion of this exercise is to complete the TutorialsPoint C-Environment Setup tutorial phase (but skip the “Try It Option Online” part).
Once that is complete, proceed with:
.c
filemake
commandMakefile
to build your programMakefile
also supports a clean
target, which removes products of compilationMakefile
to ensure it operates as expectedRemember to have your work reviewed by, as well as to seek help/advice from, your instructor.
Here is a sample Makefile as a kick-start:
PGM = hello all : $(PGM) @echo Done clean : @rm -f *.o $(PGM) : hello.c gcc -o $(PGM) hello.c
Read these sections in the TutorialsPoint tutorial:
… then, read the manpage for printf
.
Once complete with these readings, write a program that stores integer values in four different integer variables, and prints each out using the printf
function, making sure the name of the variable is shown before the value.
Once you have completed that, read this TutorialsPoint section, and then alter your program to do a number of typical arithmetic operations upon your variables, printing out both a label showing the calculation being done and the result for each.
Read these sections in the TutorialsPoint tutorial:
… then, alter your program to start with one number (as one of your variables), and compute the result of n2 - 1
for n
up to a higher number (as another of your variables). Make sure that the calculation being performed and the result are printed for each iteration.
When that program is complete, read this TutorialsPoint section, and then move your calculations into a function that takes the beginning and ending for you loop as parameters.
Links: Tech Info … Mantis Area