Variables in C

Variables in C

Variable is a storage place to hold data which has some memory allocated to it. It is used to store data.  it can be reused many times. We can change value of a variable during execution of a program. Different types of variables require different amounts of memory. C is a strongly typed language. This …

Variables in C Read More »

Data Types in C

Data Types in C

Data types are declarations for variables. It specifies the type and size of data that a variable can store. Each data type requires different amounts of memory and has some specific operations which can be performed over it. There are the following data types in C Basic Data Type Derived Data Type Enumeration Data Type …

Data Types in C Read More »

Comments in C

Comments in C

Comments are ignored by the compiler. We write comments to provide information and better understanding of the program or about lines of code. There are two ways in which we can write comments in C program Using //:- This is used to write a single-line comment. 2. Using /* */:- The statements enclosed within /* …

Comments in C Read More »

Basic Syntax Rules in C

Basic Syntax Rules in C

A smallest individual unit in C program is known as C Token. Tokens are either keywords, identifier, constants, Variables, string literal or any symbol which has some meaning in C language. A C program can also be called as a collection of various tokens. i.e:- printf(“Hello, World! \n”); consists of five tokens 1- printf, 2- …

Basic Syntax Rules in C Read More »

Simple C programs

Simple C programs

In this example, we will learn to print “Hello, World” The #include is a preprocessor command that tells the compiler to include the contents of stdio.h (standard input and output) file in the program. This is a standard input-output file that contains the definitions of common input-output functions such as scanf() and printf(). In the …

Simple C programs Read More »

Basic Structure of C

Basic Structure of C

C program basically consists of the following parts:− preprocessor directives Section Definition section Main Function Section Variables Section Comments Section Sub Program Section preprocessor directives Section:- This part of the code is used to declare all the header files that will be used in the program. The first line of the program #include <stdio.h> is …

Basic Structure of C Read More »

Features of C Language

Features of C Language

C is a procedural programming language that is simple, and flexible to use. It was mainly developed as a system programming language to write an operating system. It is a structured programming language that is machine-independent. The main features of C language include low-level access to memory, a simple set of keywords, that makes C language …

Features of C Language Read More »

History of C Language

History of C Language

C Language is developed by Dennis Ritchie in between 1972 and 1973 , at the Bell Telephone Laboratories to develop the UNIX operating system. The UNIX OS was totally written in C. It was developed to overcome the problems of previous languages such as B, BCPL, etc. It inherits many features of previous languages such as …

History of C Language Read More »