If you are trying to teach someone the basics of programming, basic operators are enough. A great exercise is "write a function that takes an ASCII string in as input, parses it, and returns an integer. And write a program that takes the string input, parses it, and displays the output to the screen."
It's a great exercise. Writing your own atoi function was one of the first things I did when teaching myself C.
This is the difference between learning the language as a training exercise, and learning the language with an eye to writing software in it. C is a very easy language to learn as a training exercise. It's only when you get into writing significantly complex programs that C becomes a language that takes a lot of time to master.
The goal here is to learn how to program, not learning how to write programs in C, so the sorts of tasks and things are really pretty approachable.
Ok, if you really want something more advanced, write a program that, say, shuffles a deck of virtual playing cards. Again, something a beginner at programming would learn a lot from (pointers, data structures, memory management) but a professional C programmer would laugh at as trivial.
It's a great exercise. Writing your own atoi function was one of the first things I did when teaching myself C.
This is the difference between learning the language as a training exercise, and learning the language with an eye to writing software in it. C is a very easy language to learn as a training exercise. It's only when you get into writing significantly complex programs that C becomes a language that takes a lot of time to master.
The goal here is to learn how to program, not learning how to write programs in C, so the sorts of tasks and things are really pretty approachable.
Ok, if you really want something more advanced, write a program that, say, shuffles a deck of virtual playing cards. Again, something a beginner at programming would learn a lot from (pointers, data structures, memory management) but a professional C programmer would laugh at as trivial.