Why are we only allowed to declare and define variables in global section?Why not include assignment in global section? Example:
#include
int
For both questions the answer is the same, in file scope there is no execution of statements or evaluation of expressions, all is done at compile time.
Other languages (C++ is an example) have a model for dynamic initialization at program startup. This is a complicated issue, e.g because initializers that come from different compilation units don't have a natural ordering among them, but might implicitly depend on each other. SO is an excelent source of information for this question, too.
C tries to stay simple, simple to use for a programmer and simple to implement for compiler builders.