[Android General] mhrsolanki2020:
C Programming Begins!!!​

So today we would have started with C programming ,but according to me and my fellow developer friend with whom i discussed of how to teach it to you and decided that we will teach you some extra things. As we are secondarily studying this for learning Android stuff though not only for android , we will try to teach everything about C but we will also try to teach you some extra things that will be helpful while you start with your android development .

So the main things are :

What is Computer?

What is an Operating System?

Where is C usefull in all this?

What is android?

==========================================

What is computer?

-> The definition of computer have changed as it has got many changes in it. Years before when computer wasnt invented , the person who used to do calculations was referred as a Computer as he used compute the Mathematical problems. But as the machine was invented to do the calculation , The machine was then named as "Computer".

==========================================

What is a Operating System?

=> Years Ago when computer was first invented,

it had a monitor of small size, one full room of chips and stuff (today it fits into a small box and we call it CPU) the name of the room was Central Processing Unit , (the room was the core of the computer , and as you know a room is also called as a Unit) . That room used to get commands from other room where the input from user was taken , and then processed and sent back to the same room for displaying it on Monitor. Hence it was a processing room too. So the room with chips used to Process things , it was the Core thing and hence it is named as Central Processing Unit(CPU).

(If you are interested in all the things I said above, then you must study Computer Architecture , as study of all these stuff is known as Computer Architecture .)

When this Computer was invented , it was just for the sake of calculation , you can say it was a 2 room huge calculator. And when you start the computer , You just see a black screen , and then you had to write the whole calculator program in a programming language you like (idk what language was used at that time ) and then do the work. The calculator program was very huge and it was very tiring job of writing it everytime you turn on the computer. So then someone invented "something" that stored the things in it. This "something" was named as Memory. As it stored the calculator program, it was kind of a Memory for the Brain(CPU) of the computer, Hence named as Memory. (This memory was very small it wasnt even 1kb ) And then the Calculator Program was written again and then stored to the memory . So everytime you turn on the Computer you dont have to Write the whole calculator program you just have to write some set of codes to go to memory and run that calculator program. Eventually when the need of computers increased from just calculation to many other Office work , like Storing the customer information, making the list of expenses and profits of an company many such applications were made . But still to run any of these application , some set of codes were neccesary and hence it was useless till some extent for normal people. So a new era was started, The era of operating systems. It was like you will have applications for using APPLICATIONS, eg if you want to use calculator in windows operating system, you will go to Start menu and then accesories and then select calculator. This is called GUI, meaning Graphical User Interface. Today we can make a folder by right clicking and selecting "New Folder" this wasnt the scenerio at that point of time , they had some set of commands to create a folder.(even today you can make a folder with this command in Command Prompt "mkdir NewFolder" mkdir meaning make directory , and then "NewFolder" is the name of the folder. If we want to see what folders we have in c drive, we just go to MyComputer and then go to c drive, this wasnt the case at that time, they had to write set of commands to navigate till that directory , and then had another command to List all the files and folders in that place. So everything was based on Commands Given by the User. So an need of Operating System was essential , where in commands were given by user interface(eg right clicking and making a folder is as good as opening command prompt, navigating to the location and then giving commands to make a new folder .) So when all these things are put together and then the need of Commands is decrease for day to day work , this package of software is known as Operating System.

There are different companies making Operating Systems depending upon the hardware capabilities of a Computer. eg, Windows, Linux and Mac(apple).

Note: The Definition of an Operating System is way too big than i explained above, but this is what you should know as of now.

==============================================================

Where is C usefull in all this?

=> The whole operating System is made in C language. It is a fact that, Windows consists of 13,000 lines of codes where in only 800 lines are not writen in C launguage . Now you can see what is the value of C . (will be writing C rather than C language ) C is widely used in making Operating Systems , Games and Kernels in other electronic Devices.

==============================================================

What is kernel?

=> A set of codes writen in C language that lets the Software and the Hardware communicate is known as kernel. For eg , if you press the volume Down button (hardware) how does android phone knows that the volume down button was pressed and the he has to lower the volume by a level in the phone?

See the image below:

The Hardware says the kernel that the user wants to lower the volume , the kernel comunicates with Operating System(OS) and tells to lower the volume by one level , and then it displays that the volume is decreased .

===================================================

Why C in everything?

=> C is widely used in everything because it is very fast as it is in direct contact with Hardware via kernels. So it is faster than any other programming language. It is not only used in computers. The Food Processor with Timing, the Tv Remote etc everything has C in it.

===================================================

What is Android?

=> Android can be simpt explained by saying "The mobile version of Linux is known as Android"

This was just a chapter for some extra information that would be usefull in your future when you will start doing some work in android or windows, or even when you will try to make some programs in C while you are learning from this tutorial.