Introduction – describe the concept of software before starting to learn C programming
- 24-07-2022
- Toanngo92
- 0 Comments
When the computer starts the operating system, BIOS System or starts running a program, it will show us something on the screen for the user to understand and communicate with the mouse and keyboard, with the environment. black screen, then the user will interact with the computer with the keyboard and the command line, we will understand the following: the use of the keyboard to type commands is to command the computer to do the task according to its purpose , the computer will understand the command, execute the task and display the results to the user, to do this, the computer will need a set of programs to execute the corresponding task. Each program is made up of a set of blocks of instructions to help the computer solve a particular problem. A program is made up of groups of instructions, a software is made up of programs. We can relate to real-world problems, for example:
An enterprise management software will include human resource management, material management, project management programs, inside these subprograms include features (group commands) add, delete, search search with each subroutine…
Although the example is not very suitable for the C programming language because few people do management software in the C language, perhaps you will have a clearer picture of what you have just described.
For example, the simplest problem is to write a program that calculates the sum of 2 numbers entered by the user and prints it to the screen. The way it works is as follows:
- Ask the user to enter the first number
- Save the first number in the computer's memory
- Ask the user to enter a second number
- Store the second number in the computer's memory
- Ask the computer to add the first number and the second number, the result is stored in the third number in the computer memory
- Print the 3rd number in the computer memory to the screen as the result for the user
- End program
As the above path, we see broken instructions, described in a sequential way, clearly showing the instructions for each execution item.
When the descriptions become more and more, leading to too long and complex blocks of code, then we will continue to break them down, aggregating each block of instructions that execute a certain job into a program, and when the programs are finished. together to form a software.