Comments on C Programming Tutorial 4 - Variables and Memory

In this tutorial series so far, we have discussed how to create and run a basic C program, what are preprocessors, as well as basics of variables. Now let's dig a bit deep into variables and discuss the memory aspect.

1 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Crito Philippatos

First, thanks for these excellent tutorials.

The factorial example above contains an error, however. scanf still expects an integer and num is defined as long long. So I changed:

 int num = 0; long long temp = 0, result = 1;

 printf("\n Factorial of %d is %lld\n", num, result);