#Meta-Wlp: #Macro: TITLE wlp: Learn C (5) p. 10
Well, so far we have learned about structs, now to declare them, allocate structure variables, define structure tags, assign values to the elements of a structure and to the entire structure, and pass them as arguments to functions.
Note: I lied. To get ths program to work I had to use a special compilation switch, -fwritable-strings. Else a string initialized as in the program is constant, and it is placed in memory marked read-only. Trying to write to any character in a literally defined string results in a program crash. This might depend on your compiler. The compiler switch -fwritable-strings for GNU cc forces the compiler to treat strings as possibly alterable. It is not happy about this, but it can do it if asked.
#Shuffle: none $PAGE$-A Return to Index. #: Continue. #: