Introduction, History, Input, Output Statement & Advantages of C language, Ampersand Sign, Difference between Low and High level languages

Introduction, History, Input, Output Statement & Advantages of C language, Ampersand Sign, Difference between Low and High level languages

Introduction, History, Input, Output Statement & Advantages of C language, Ampersand Sign, Difference between Low and High level languages

To view other topics related to Computer. Click Here.

Write Advantages of C language

Advantages:-

1. As the syntax of C language is very easy and short so it is easier to understand at the begging stage.

2. As its syntax is like by machine language so it is also called middle level language.

3. It is modular programming.

4. It is portable language, portable means that one program witch be written in one computer can easily be run or checked on another computer.

5. It is graphical language that is why its modern version likes C++ and visual C etc. They are use in graphical programming.

What is Ampersand Sign

Ampersand sign:-

When we input data with scanf ( ) function, then variable is joined with a special character and which is called ampersand sign and it is used for the address of that data and without this character we can not input any data in to variable.

Input and Output Statement in C language

The input statement: -

Input is that statement which is used to give data to the variable in the program. For C language the main input statement is scanf ( ). It is used in the program will be as:

Scanf (“format specifier”, ampersand sign variable);

For example:

Scanf (“%d or %f or %c or %s”, &a);

%d format specifier is used for integer type data.

%f format specifier is used for real type data.

%c format specifier is used for character type data.

%s format specifier is used for string type data.

The symbol & (ampersand sign) is used with scanf ( ) function and it is used to show the address of data.

The output statement: -

The output statement is that statement is used to display the result on screen. For this purpose the function printf ( ) is used. We can use it

Printf (“Message”);

Printf (“format specifier”, variable);

Printf (“%d or %f or %w”, sum);

Introduction and History of C language

Introduction: -

C is a programming language developed by Dennis Ritchie in 1972. Programs are structured by defining and calling functions. Program flow is controlled using loops, if statements and function calls. Input and output can be directed to the terminal or to files. Related data can be stored together in arrays structures. C allows the most precise control of input and output.

History of C language: -

C is a general purpose programming language. It was developed at AT&T Bell Laboratories, USA in 1972. It was designed and developed by Dennis Ritchie. It was based on an earlier computer language called B. The B language was developed by Ken Thompson in 1969-70. For this reason, earlier version of the C language was called K&R C (Kernighan and Ritchie C).

The C language is a simple, easy to learn and powerful language. As more and more people started using C language, need to standardize its rules was felt. To meet this need, the American National Standards Institute (ANSI) developed a standard for the C language in late 80s. This version of the C language is known as ANSI C.

Difference between Low and High level languages

Low level language: -

It is actually initial computer language. It is categorized into two types

(1) Machine language (2) Assembly

(1) Machine language: -

It is the directly computer understood language. That computer language with does not need convert into any other interface or language for the understanding of computer. This language consists of binary digit these are (0, 1).

(2) Assembly language: -

It is low level language but one step higher then machine language. This language is always needed to first convert in to machine language and then computer can understood it. For this purpose a converter program “Assembler”.

High level language: - The programming languages that are close to human language are called high level language. The instructions in those languages are more like human language. Unlike low level language, these languages are sassier to learn. These languages are BASIC, FORTRAN, COBEL, PASCAL, C, C ++, etc. These languages are used for writing application programs. Every high level language has its own set of rules for writing program.

These rules are called the syntax of the language. A program written in a high level language is called source program or source code. Source code cannot be run directly on the computer. It is first translated or converted into the machine language. The application that is used to convert a source program into machine program is called compiler.

Post a Comment

Previous Post Next Post