Sunday, 28 May 2023

C language basics

                                           What is C language?

The C language is developed by Dennis Ritchie in the year 1970’s at Bell Laboratories. It was designed for programming of operating system called as UNIX. Almost about UNIX operating system comes with C compiler itself are written in C.

c language basic, c programming, c coding
C language basic image-1

It is a middle level language. It also high level language as well as the power of a low level language. C is a small level language there are have 32 English words know as if, else, break, for and so on.  C contains control structured program, it is considered a structured programming language. It includes selection like as if… else, switch, reception while, do while, for and exit (break).

C compiler program with some collection of one or more functions. Every function are collection of statements and works as some specific task. See general structure of C program:

Comments, global variables, preprocessor directives, main() functions, local variables, statements and so on.

Comments are use anywhere in a program and are enclosed with /* and */. Comments are used generally of documentation purpose.

Before execution of program starts with main() function. It has two parts one is declaration of local variables and statements. It also execute one by one, other functions are user defined functions, it may be possible of some variables have to used in many functions.

Environment for C has execution of C program are as:

1.       Program creation

2.       Program compilation

3.       Program execution

It is a command line for C compiler is provided with UNIX operating system.

The main 32 keywords are for doing specific tasks. It is predefined meaning in C. it has always in lowercase, available in C which is given below:

Auto, break, extern, float, for, goto, if, int, long, register, return, short, signed, sizeof, static, struct, switch, typedef, union, case, char, const, continue, default, do, double, else, enum, unsigned, void, volatile, while.

The above keywords are predefined and can’t be changed by user while identifiers are user defined words and also give names to entities like variables, functions, structures, arrays etc.

The identifiers are there in C language it is C is case sensitive the uppercase and lowercase letters are used different. For example: code, Code, CODE is three different identifiers.


Computer stuff kit tricks of Topics 41.