google.com, pub-8786015629279405, DIRECT, f08c47fec0942fa0 Introduction of C Language

Introduction of C Language

0


What is Programming?

Data : Data is a raw or unorganized fact that can be stored in the Computer memory.

Information : Information is a set of data which is processed in a meaningful or organized way.

Instruction : Instruction is detailed information to operate something.

Program : Program is a specific set of ordered operations for a computer to perform.

Programming : Programming is the process of creating a set of instructions that tell a computer how to perform a task.

Step of Data to programming




What is Computer Programming Language?

Language : A language is a structured system of communication which is used to transfer our view from one to another.

Computer Language : A 'computer language' is a system of communication with a computer.

Machine Language : Machine language, or machine code, is a low-level language comprised of binary digits (ones and zeros).

Computer Programming Language : Computer programming language allow us to give instructions to a computer in a language the computer understands (High Level Language).

What is C Language?

  • C is a Programming Language.
  • C is a Procedural Programming Language.
  • C is a Structured Procedural Programming Language.
  • C is a general purpose Structured Procedural Programming Language.
  • It can be used to develop software like operating systems, databases, compilers, and so on.


Introduction of C?

C is a general purpose Structured Procedural Programming Language.

It was initially developed by Dennis Ritchie in the year 1972.

It was mainly developed as a system programming language to write an operating system.

C is High Level programming language which is used a compiler to convert into Low Level language or Machine Level. 

C is typically used to develop for operating system tools and compilers.

Many language like Java, Javascript, PHP, .Net used the Syntax based on the C Language.

The main features of C language include low-level access to memory, a simple set of keywords, and clean structure.

Structure of C Language:


Structure of C language



1. Documentation section : The documentation section consists of a set of comment lines giving the name of the program, the author and other details, which the programmer would like to use later.
Link section : The link section provides instructions to the compiler to link functions from the system library.

2. Definition section : The definition section defines all symbolic constants.

3. Global declaration section : There are some variables that are used in more than one function. Such variables are called global variables and are declared in the global declaration section that is outside of all the functions. This section also declares all the user-defined functions.

4. main () function section : Every C program must have one main function section. This section contains two parts; declaration part and executable part 

5. Declaration part : The declaration part declares all the variables used in the executable part.

Executable part : There is at least one statement in the executable part. These two parts must appear between the opening and closing braces. The program execution begins at the opening brace and ends at the closing brace. The closing brace of the main function is the logical end of the program. All statements in the declaration and executable part end with a semicolon.

Subprogram section : The subprogram section contains all the user-defined functions that are called in the main () function. User-defined functions are generally placed immediately after the main () function, although they may appear in any order. 

Note: All section, except the main () function section may be absent when they are not required.

Structure of C Program

#include <stdio.h> 
#include <conio.h>
 void main() 
printf(“All About Study by Ashish Goel"); 
getch();
} 

Step 1 -> [ #include<stdio.h>
          #include<conio.h>  ]

In a C program, all lines that start with # are processed by preprocessor which is a program invoked by the compiler. 

Ex. preprocessor copies the preprocessed code of stdio.h and conio.h to our file. The .h files are called header files in C. These header files generally contain declaration of functions. We need stdio.h for the function printf() and conio.h for the function getch(); used in the program.

Step 2 -> [ void main() ]

In C, the execution typically begins with first line of main(). The nothing written in brackets indicates that the main doesn’t take any parameter.
The void written before main indicates return type of main() is void type.

Step 3 -> [{ and }]

In C language, a pair of curly brackets define a scope and mainly used in functions and control statements like if, else, loops. All functions must start and end with curly brackets.

Step 4-> [ printf(“All About Study by Ashish Goel”)]

printf() is a standard library function to print something on standard output. The semicolon at the end of printf indicates line termination. In C, semicolon is always used to indicate end of statement.


Watch Detailed Video on Youtube 

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Thank you for your interest 😊

We will back shortly after reviewing...

Thank you for your interest 😊

We will back shortly after reviewing...

Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top