Posts

Showing posts with the label part-2

A Student's C Book: 1.2. Basics

Image
Level 1. Introduction to C 1.2. Basics Your computer can memorize things One of the things that you can make your computer remember is integer numbers. As one would do in math, you can assign numbers to variables (usually to reuse them later on when needed). Roughly speaking, this is how computers remember things. You use a variable to make a computer remember a number. You may ask why there needs to be a variable to remember a number. Well, let's imagine that you were to be given multiple facts to memorize. For simplicity, I'll only assume two of them: Alice is 3 years old, and Bob is 5 years old. Now, you are asked about Bob's age. If you didn't associate 3 and 5 with the names Alice and Bob, respectively, then you wouldn't be able to answer this question with certainty. So, your mind probably did something similar to what we do in math -- use variables to represent those numbers, that is, Alice = 3  and Bob = 5 . That's why you were able to answer...

A Student's C Book: 1.1. Hello, World!

Level 1. Introduction to C 1.1. Hello, World! What if I told you that you could talk to your computer via text files? Yeah, that's right. Opening up a text file is like opening your messaging app to talk to your friend. The sorts of things that you can write on a messaging app, such as asking whether your friend will come to the university tomorrow or asking for the solution for homework that the teacher gave during one of yesterday's classes, are also possible to do with your computer. However, there is a small but surely expected catch: you have to open up a new text file on your computer instead of an app on your phone, and you have to learn the computer language to be able to speak to it. I mean, what else would one expect? If you were to talk to people from different countries, you wouldn't have been able to use your mother tongue all the time. As we sometimes need to learn foreign human spoken languages to be able to communicate with other people, now you ...