Introduction of C- Language
Introduction of C- language
early 1970. The language was formalized in 1988 by the American National Standard Institute(ANSI).
What is C language?
Let us explain the features of C programming language and why anybody says it structured programming language, procedural-oriented language, and mid-level programming language
What is Procedural Oriented Language?
Main program
↙ ↓ ↘
Function-1 Function-2 Function-3
↘ ↙ ↓ ↘ ↙
Function-4 Function-5
↙ ↘ ↙ ↘
Function -6 Function-7 Function -8
Typical Structure of procedure-oriented program
While we concentrate on the development of functions, very little attention is given to the data that are being used by various functions. What happens to the data? |How are they affected by the functions that work on them?
Global data Global data
↙ ↘ ↘ ↙ ↙ ↘
Function-1 Function-2 Function-3
Local data Local data Local data
Relationship of data and functions in procedural programming
In a multi-function program, many important data items are placed as global so that they may be accessed by all the functions. Each function may have its own local data.
Global data are more vulnerable to an inadvertent change by a function. In a large program, it is very difficult to identify what data is used by which function. In case we need to revise an external data structure, we also need to revise all functions that access the data. This provides an opportunity for bugs to creep in.
What is the Structured programming language?
The structured programming language- Structured programming language means in a c language, large programs are divided into smaller programs known as functions or blocks and Data moves openly around the system from function to function. And in other words, we can say, we break the particular program into parts using functions. It makes the program easy to understand and modify.
What is Middle- Level programming language?
The Middle-level programing language-- Basically computer languages are divided into 3 categories like High- level Middle-level and Low-level. BASIC, COBOL, FORTRAN, and PASCAL fall into the category of High-level languages. Assembly language falls into the low-level language. as we before say that C is a middle-level programming language. it means it supports the feature of both low-level and high-level languages. C language program is converted into assembly code, it supports pointer arithmetic (low-level) but it is also machine-independent ( it is a feature of high-level). A low-level language is specific to one machine, or machine dependent. It means it is machine-dependent, and fast to run. But it is not easy to understand instead a high-level language is not specific to one machine, or in other words, it is machine independent, and it is easy to understand.
Mother language -- C is also called the mother language case all modern programming languages compilers J.V.M.(Java virtual machine) Kernels are written in C language. It provides the core concepts like the array, strings, functions, file handling, etc, that are being used in other languages like C++, Java, and C#.
Common facts of C language are C is a middle-level language. MS-C is a C compiler it is developed by Microsoft USA. Microsoft-C provides an integrated environment to develop C programs. MS-C provides On-Line Help on any command. MS-C menu is activated by pressing the Alt key.
Structure of A c program
# include <stdio.h>
int main()
{
printf("Hello C language");
return(0);
}
or we can also write it following
# include<stdio.h>
void main()
{
printf("Hello C language");
getch();
}
- Write this (above written text) program into any text editor like notepad or notepad++ and Save it. C file Extension by pressing the Ctrl+S key. or go to the file menu and click on the save command. like Hello. c
- And open your compiler like turboc+ and open your written program. Like hello. c.
- For a compilation of this program file(Hello. c)-- press the Alt+F9 keys together.
- For the execution of this program file(Hello. c)--- Press the Ctrl+F9 keys together.
Comments
Post a Comment