1. Introduction to Digital Marketing
2. Website Planning and Creation
Let's Get Familiar with C Language: Introduction to C Language
Language for writing procedural programmes is C. Dennis Ritchie created it for the first time in 1972. It was primarily created as an operating system programming language. Low-level memory access, a small collection of keywords, and a clean style are the fundamental characteristics of the C language, which make it appropriate for system programming like operating system or compiler development. Many following languages have directly or indirectly inherited syntax and features from the C language. Like the grammar of Java, the foundation of many other languages, like PHP and JavaScript, is the C language. A small number of programmes can be compiled in C, but not in C++, making C++ almost a superset of C.First we will learn about the rules of C programming
The following guidelines must be followed while creating C programmes:- Every programme needs a main() function to launch and provide output.
- A semicolon should be used to end each statement.
- It is considered an empty statement if a line of code contains just semicolons.
Lower case should be used for all variable and function names; capital letters are only used for symbolic constants.
There should be a closing brace for every opening brace.
Using a C programme, let's write 'How Are You?'
#include
int main() {
/* your first programming in C language */
printf(“How are you \n”);
return 0;
}
The components of the above structure are:
1.
Header Files Inclusion: The Header files must be included in a C programme as the first and most important component.
The term "header file" refers to a file with the extension ".h" that includes shared C function declarations and macro definitions.
There are two varieties of header files, including:-
Standard Library Header Files: In C, they are already-existing header files.
User-Specified Header Files: Header files that have been defined by the user fall under this category.
A header file is defined using the #define directive.
Two methods exist for adding a header file to your programme:
#include
Angle brackets are used to encapsulate the header file.
The most typical method of defining a header file is this one.
2.
Main Method Declaration: Older C compilers may support the default return type of function functionality.
If not specified explicitly, it uses 'int' as the default return type.
The main function is defined as returning an integer with no arguments.
To return the integer value in this case, a return statement is unnecessary.
3.Return Statement: The return statement comes last in any C programme. The values from a function are returned using the return statement. The return type of the function determines this return statement's return value. There won't be a return statement, for instance, if the return type is void. In all other circumstances, a return statement will be present, and the returned value will be of the specified return type.