In this series, we are going to learn the fundamentals of computer programming. Language-specific features will be provided in a different series. A programming language is one of the possible ways to instruct a computer. We try to solve a real-life problem. Every programming language might not be suitable for the current problem at hand. In other words, we can say that programming is the skill of implementing an algorithm in a programming language. An algorithm is a step-by-step solution for a problem. So, we can not solve a moderate-size problem in one step. We need to break down a problem into problems of a manageable size. The person who does programming is known as a programmer. Some programmers deal with computer hardware and they are known as system programmers. Others are known as web programmers and write web applications. So, the different types of developers(programmers) use different programming languages to handle thei...
Continuing from Programming Concepts Part II . A computer cannot understand instructions as given in the previous part. We have to change those human-understandable instructions to machine-understandable instructions. It is known as the machine language of the computer. A computer only understands a sequence of 0s and 1s. Most of the time we see mention of the 0 and the 1. But we can also say yes/no, on/off, true/false and so on. There are two states, either present or absent. All numbers, texts, images and so on are a sequence of 0s and 1s. There are two states or symbols(0 and 1), so it is called a binary system . A single 0 or 1 is called a bit for a binary digit. Its counting goes like this, 1 = 1 10 = 2 11 = 3 100 = 4 101 = 5 110 = 6 111 = 7 1000 = 8 1001 = 9 1010 = 10 1011 = 11 1100 = 12 1101 = 13 1110 = 14 1111 = 15 and so on. The place value is like 1, 2, 4, 8, 16, 32 and so on from right to left. When the number of bits is large, it is grouped in 3 bits from the right ...
As we know from the Hello World program, the execution of a Rust program starts from the main function. Again, we can create a chain of function calls. When the execution of the main function ends, we can say that the program has stopped running. But, to end the main function, all functions which have been called from the main function should end first and this is true for every function call. ...
Comments
Post a Comment