It is the type of value which the variable holds.
Here, we will focus on the most basic ones:
Here’s an example of how we declare a constant.
Special symbols that are used to perform actions or operations are known as operators. They could be both unary or binary.
For example, the symbol asterisk (*) is used to perform multiplication in C so it is an operator and it is a binary operator.
This section covers all types of operators.
Sometimes, we wish to execute one set of instructions if a particular condition is met, and another set of instructions if it is not. This kind of situation is dealt with in C language using a decision control system.
The condition for the if statement is always enclosed within a pair of parentheses. If the condition is true, then the set of statements following the if statement will execute. And if the condition evaluates to false, then the statement will not execute, instead, the program skips that enclosed part of the code.
An expression in if statements are defined using relational operators. Comparing two values using relational operators allows us to determine whether they are equal, unequal, greater than, or less than.
If we want to execute a particular code in some situation and its vice versa /opposite/or different code if that situation doesn’t occurs then if..else statements can be used. Its all depend on the condition. If the condition returns true value the situation has occurred and the true part of code will be executed and if condition returns false value false part of the code will be executed
Following is the syntax of if-else statements:
One example where we could use the if-else statement is:
Output:
A function is nothing but a group of code put together and given a name and it can be called anytime without writing the whole code again and again in a program.
I know its syntax is a bit difficult to understand but don’t worry after reading this whole information about Functions you will know each and every term or thing related to Functions.
Library functions are pre-defined functions in C Language. These are the functions that are included in C header files prior to any other part of the code in order to be used.
E.g. printf(), scanf(), etc.
User-defined functions are functions created by the programmer for the reduction of the complexity of a program. Rather, these are functions that the user creates as per the requirements of a program.
E.g. Any function created by the programmer.