on
Fundamental Concepts In Programming
Here, I’m giving notes on some of the fundamental concepts common in every programming languages. These are common for a reason, every programming problem you’ll face in your life needs these in one way or another. So, master these must-know concepts and then grab a reference book on a particular language. Then use these basic skills to solve problems(ever heard of project euler??) Gradually increase the difficulty of the problems you’re solving. Use the internet to research on hard problems, learn the skills needed to solve them from your reference book and please don’t stop until you’ve come up with a solution!
Building-Blocks of every programming language:
Statement: A statement is an instruction that’s get executed. Statements are executed sequentially from top to bottom. Every statement is boiled down to a specific boolean value of 0(False) or 1(True) after execution.
Control Structure: These are used to alter the sequential program flow that results from the execution of statements. Control structures like if-else,switch-case is used to obtain complex program flow in order to do bigger tasks.
Variable: A variable can simply be thought of as an object that holds data that can be changed —hence the name. There’s also a type of variables that don’t change, they are called constants.
Arithmatic Operators: Whatever we instruct the computer to do, it all comes down to calculation at some point. That’s the point of computers -to compute! The basic four arithmatic operation familiar to us from algebra is thus presented in programming languages as arithmatic operators. There’s another operator that’s usually present, which is the modulo operator (% in C) -useful to compute the remaider from a division.
Comparison Operators: At some point in writting programs, you’ve to compare between different values, which can be either an integer or maybe an object itself. For these programmers are provided Comparison operators in their arsenal. These are namely greater than > ,less than < ,equal to ==, not equal to != and/or combinations of these.
Loops: There’ll be times a programmer would need to perform a instruction more than one time. These are accomplished with loops. Loops can be thought of as a special operation that gets something done for a given number of time.
Function: Function is also known as method/procedure. These are basically a group of instructions grouped together by the programmer in order to use at several points of the program as need arise.
If confused then search the internet for any given topic.