The path variable contains a list of directories. When a user
types a command that does not contain a "/", the shell searches each directory
in that list for the command, and executes the first such file it sees.
Beause ANSI C does not specify the order of evaluation of function
argument, any of the following outputs are possible:
2 3 4
2 4 3
3 2 4
3 4 2
4 2 3
4 3 2
x = 5, a = 1, b = 4, c = 6
x = 1, a = 0, b = 5, c = 6
x = 1
x = 0
x = 5
x = 3, dx = 3.2
x = 0
3
0
3
6
5
3
3
1
3
n = -123
This program compiles correctly. It may give a warning
because p is uninitialized when it is used.
When fgets tries to store the line beginning at the address in p, an
error
occurs. Either the input line is stored at a random memory location, or (more
likely) the program terminates abnormally. The problem is that p is
uninitialized.