danwritecode / clings

rustlings for C....clings
MIT License
43 stars 7 forks source link

Exercise 38: Scope Rules in C ("scope_rules") ("Chapter 4.4") #109

Open danwritecode opened 5 months ago

danwritecode commented 5 months ago

Looking for help creating exercise: Topic: Scope Rules in C Exercise Directory Name: scope_rules

Note: For Directory Name, refer to the exercises directory to find the correct number to use. It should be close to the number in the issue title but may be slightly off.

Refer to "The C Programming Language" book, Chapter 4.4 for more information.

Contribution instructions: https://github.com/danwritecode/clings?tab=readme-ov-file#contributions

sleaper commented 3 months ago

For this exercise (chapter 4.4) and exercise #108 (chapter 4.5), we must compile multiple .c files into a single program to demonstrate the principles of extern and header files. Also, we will need it in the future for maybe more complex exercises.

I propose that all .c files in the exercise folder with a suffix such as ex (for executable) will be compiled into one program. For now, I will skip these two chapters. If anyone has another idea on how to approach this, please let me know.

danwritecode commented 3 months ago

@sleaper let me think about it a bit, but your proposal makes sense at a surface level.