Wednesday, July 10, 2019

Basic concepts, reference and basic list of C Programming language.

In this post, you will learn about the basic concepts and basic reference terms used in the c programming language. and also see the basic list of c programming.

basic concepts, reference and basic list of c programming language., basic of c programming
c programming concepts

Introduction to c programming

C is a general-purpose language. it was developed by Dennis Ritchie in 1973. it is used to developed and write code for operating systems like Windows and other operating systems. it's also used to develop such good complex programs like Git, Python interpreter and many more. it's a low-level programming language. one of the good thing about this language is that it's easy to learn and also very close to work in a way like which a machine works. there are so many programming languages which are developed using the core concepts of c programming.

Basic concepts and reference list

#include :
This code is used to include one source file from one to another.

<stdio.h> :

This header file is used to defines the standard input and output streams which are used to print output and take inputs from the user.

printf() :

This function is used to print the output message on the output screen.

scanf() :

This function is used to take input from the user.

break :

This statement is used to exit from a loop or from a statement.

continue :

This statement is used to terminates the current line of code or current iteration.

int :

This is the data type in c programming which is used to hold the whole numbers and declare the integer variables.

float :

This is the data type in c programming which is used to hold the floating-point numbers or decimal numbers and used to declare the floating-point variable.

char :

This is the data type in c programming which is used to hold the single character or symbol and used to declare the character type variable.

string :

a string in c is an array of characters that ends with a NULL character or terminates by null( \0 ) character.

array :

This is the user define data-type. which is used to store the sequence of values which has the same data-type.

pointer :

This is used to store the address of the object.

void pointer :

void pointer is the pointer which can be assigned any type of variable's address.

Union :

This is used to store different data types in the same memory location. this is also a user define data-type.

structure :

This is a user-defined data-type which is used to store the different data types variables in a group but on different locations.

void :

This is also a predefined data type which is used when we have the absence of value in the variable.

sizeof() :

This is the function which returns the size of an object in a byte.

enum :

This is a user define data-type which is used to store the values like an array and by default, the value of first data in an enum starts from zero and incremented by one.


comments are the explanatory information which is included in the program to benefit the reader of your code. the compiler doesn't execute the comments, so they have no effect on the output of the program.

Arithmetic operators :

operators are used to performing arithmetic operations like additions(+), subtractions(-), division(/), multiplication(*) and other such other operations.

Assignment operations :

An assignment operation is used to assign the values to the variables and compare the two values of variables.

Relational operators :

The relational operators are used to perform a boolean expression which returns true or false.

logical operators :

logical operators are used to forming a compound boolean expression that tests multiple conditions.

Type conversion :

when a numeric expression contains operands of different data types, then they are automatically converted into another type as necessary. this type of process called type conversion.

variable :

a variable is a name for an area in memory. it's also called the identifier.

constant :

a constant is a variable which stores the value which cannot be changed from its initial assignment.

scope of variable :

scope of a variable refers to the visibility of variables within a program. variables declared in a function are local to that block of code and variables declared outside all functions are global to the entire program.

static variable :

a static variable is variable which retains it's value for the life of the program and can be accessed every time the function is re-entered.

if()else :

The if-else statement is used to perform different computations or actions depending on whether a condition evaluates to true or false.

conditional expressions :

the conditional expression is used to define a condition in a line of code and evaluate the code on the base of the condition's true or false.

switch statement :

switch statement breaks the code into the constant case value and performs the actions on the base of the condition's true or false. 

while loop :

while statement is used to executes a line of code repeatedly while an expression is true, looping over and over again.

do-while loop :

The do-while loop executes the loop statements before evaluating the expression to determine if the loop should be repeated.

for loop :

The for loop is used to executes the statements a fixed number of times.

main() :

This is the main function which is the center of the code. a compiler always starts the executing the code from the main function's open curly braces ( { ) to the close curly braces ( } ). a program in a c has always the main function.

functions :

the function is a block of code which is used to perform a specific task in a program. a function executes it's code when it called.

Memory :

When we declare the variables in the program then c automatically allocates space for the variable in an area of memory called the stack. there is the different-different size of memory allocation on different-different variables.

Files :
In c programming, an external file can be opened, read, and written to the c program. for these operations, c includes the FILE type for defining a file stream.

Error or exception handling :

An error or exception is any situation that causes your program to stop normal execution. so to work on the errors in the program we use exception or error handling. exception handling is an approach to processing run time errors. 

Exit() :

The exit command immediately stops the execution of a program and sends an exit code back to the calling process. 

Preprocessor directives :

Preprocessor directives are used to make change or substitutions in the program source code before compilation.

macros : 

A macro is a segment of code which is replaced by the values of code. 

Note: these are the basic terms which a programmer should know while learning c programming. 

Previous Post
Next Post

Yash is a Full Stack web developer. he always will to help others. and this approach takes him to write this page.