Posts

Showing posts with the label ansi c

How to write Comments in C Programming

Image
How to write Comments in C Programming What Is Comment In C Language? A comment is an explanation or description of the source code of the program. It helps a developer explain logic of the code and improves program readability. At run-time, a comment is ignored by the compiler. There are two types of comments in C: 1) A comment that starts with a slash asterisk /* and finishes with an asterisk slash */ and you can place it anywhere in your code, on the same line or several lines. 2) Single-line Comments which uses a double slash // dedicated to comment single lines Example Single Line Comment // single line comment example Here is an example of comments type // C program to demo // Single Line comment #include <stdio.h> int main(void) { // This is a single line comment printf("Guru99"); return 0; // return zero } Example Multi Line Comment /* Sample Multiline Comment Line 1 Line 2 …. … */ Example Multi Line Comment #

History of C language

Image
History of C language The base or father of programming languages is 'ALGOL.' It was first introduced in 1960. 'ALGOL' was used on a large basis in European countries. 'ALGOL' introduced the concept of structured programming to the developer community. In 1967, a new computer programming language was announced called as 'BCPL' which stands for Basic Combined Programming Language. BCPL was designed and developed by Martin Richards, especially for writing system software. This was the era of programming languages. Just after three years, in 1970 a new programming language called 'B' was introduced by Ken Thompson that contained multiple features of 'BCPL.' This programming language was created using UNIX operating system at AT&T and Bell Laboratories. Both the 'BCPL' and 'B' were system programming languages. In 1972, a great computer scientist Dennis Ritchie created a new programming language called