C / C++

About Ethical C programming : God Mother of all programming languages

Hello all , hope you are doing great . Today we will discuss about programming languages , first we are starting with C programming as it is called mother of all languages . So, here we start from what is programming.

What is Programming Language ?

Photo by Jefferson Santos

A programming language is a vocabulary and grammar system used to give instructions to a computer or other computing equipment so that it can carry out particular activities.

Generally speaking, high-level languages like BASIC, C , C++, COBOL, Java, FORTRAN, Ada, and Pascal are referred to as programming languages.

Each language has its own collection of keywords (words that it recognizes) and a particular syntax for arranging computer instructions.

About C programming

C is a general-purpose computer programming language.Dennis Ritchie invented it in the 1970s, and it is still quite popular and influential.

The imperative procedural language C has a static type system and supports recursion, lexical variable scoping, and structured programming.

It is a machine-independent, structured programming language that is widely used to create a wide range of apps, operating systems like Windows, and many more sophisticated programmes like the Git repository, the Oracle database, the Python interpreter, and more.

India and other nations use the C programming language because it is simple to understand and has simple syntaxes.

Why C is called mother of all languages ?

The first reason is that the majority of compilers, JVMs, kernels, etc., are written in the C programming language and the majority of programming languages, such as C++, Java, C#, etc., adopt the C syntax, therefore it is regarded as the mother tongue of all current programming languages.

Secondly , every language uses C in variable capacity.

It offers fundamental ideas, such as those found in languages like C++, Java, and C#, such as arrays, strings, functions, and file handling and handling.

Features Of C

The Features Of C are :-

  • Mother Language
  • System Programming Language
  • Procedural-oriented Programming Language
  • Structured Programming Language
  • Mid-Level Programming Language

History Of C Programming

“ALGOL” is the foundation or ancestor of all programming languages. It was initially released in 1960. The term “ALGOL” was widely used in European nations. The structured programming idea was presented to the developer community by “ALGOL.”

A brand-new computer programming language named BCPL—basic combined programming language—was introduced in 1967. Martin Richards created and developed BCPL specifically for creating system software.

Programming languages became popular around this time. Three years later, in 1970, Ken Thompson unveiled a new programming language named “B” that combined many BCPL-inspired features.

At AT&T and Bell Laboratories, this programming language was developed utilising the UNIX operating system. They were both system programming languages: “BCPL” and “B.”

Dennis Ritchie, a brilliant computer scientist, invented the “C” programming language at the Bell Laboratories in 1972. It was developed using the programming languages “ALGOL,” “BCPL,” and “B.” All of these aspects are present in the “C” programming language, which also has a number of additional notions that set it apart from other languages.

Key Applications of C programming

The Applications Of C are :-

  • In embedded systems, the “C” language is frequently employed.
  • It is employed in the creation of system applications.
  • It is frequently employed for creating desktop apps.
  • The majority of Adobe’s programmes are created in the “C” programming language.
  • It is employed in the creation of browsers and related add-ons. C is the programming language used to create Google’s Chromium.
  • Database development uses it. The most well-known database programme, created in “C,” is MySQL.
  • It is employed in the creation of operating systems.
  • The “C” programming language is used to create operating systems like Apple’s OS X, Microsoft’s Windows, and Symbian.
  • It is utilised for both the development of desktop and mobile operating systems.
  • It is utilised to create compilers.
  • IOT apps use it extensively.

How C Programming Language Works?

C is a compiled language. An object file that is machine readable is created when a programme is compiled using a special tool called a compiler. The linker will merge various object files when the compilation process is complete and produce a single executable file to run the programme.

The following diagram shows the execution of a ‘C’ program:-

Flow of Program in C programming

Variables in C

Variables are containers for storing data values, like numbers and characters.

In C, there are different types of variables (defined with different keywords), for example:

  • int – stores integers (whole numbers), without decimals, such as 123 or -123
  • float – stores floating point numbers, with decimals, such as 19.99 or -19.99
  • char – stores single characters, such as 'a' or 'B'. Char values are surrounded by single quotes

Variables nomenclatures

All C programming variables must have distinctive names to identify them.

We refer to these special names as identifiers.

Short names (like x and y) or more descriptive names can serve as identifiers (age, sum, totalvolume).

The general rules for naming variables are:

  • Names can contain letters, digits and underscores
  • Names must begin with a letter or an underscore (_)
  • Names are case sensitive (myVar and myvar are different variables)
  • Names cannot contain whitespaces or special characters like !, #, %, etc.
  • Keywords (such as int) cannot be used as names.

Keywords in C programming

In programming, keywords are preset, reserved terms that have unique definitions to the compiler. Because they are a component of the syntax, keywords cannot be used as identifiers.

There are total 32 keywords.

All keywords must be typed in lowercase since C is a case-sensitive language. The full list of ANSI C-accepted keywords is provided below.

Summary

  • Dennis Ritchie created the letter “C” in 1972.
  • It’s a powerful language.
  • It is a low-level programming language that is similar to machine language.
  • In the world of software development, it is widely employed.
  • It is a language that is focused on procedures and structures.
  • Numerous hardware platforms and operating systems fully support it.
  • There are numerous compilers available to run C applications.
  • The source file is translated into an object file by a compiler.
  • All the object files are linked together to produce a single executable file by a linker.
  • It is quite transportable.
  • It contains 32 keywords.
  • Rules for creating variable names , and many more.

Hope you find this blog useful and easy to grab . For more blogs like this check out our other blogs .

For reading blogs written by me follow my blogs https://blogs.theanalytix.in/author/utkarshsharma/

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button