C-Constant & Literal

Constant & Literal in C

Constant & Literal in C : Constants refer to fixed values that the program may not alter during its execution. These fixed values are also called literals. Constants can be of any of the basic data types like an integer constant, a floating constant, a character constant, or a string literal. There are enumeration constants as well.Constants …

Constant & Literal in C Read More »

C - Data Types

Data Types in C

Data Types in C : Each variable in C has an associated data type. Each data type requires different amounts of memory and has some specific operations which can be performed over it. Let us briefly describe them one by one: Following are the examples of some very common data types used in C: char: The …

Data Types in C Read More »

C - Variables

Variables in C

Variables in C : As we saw earlier, an entity that may vary during program execution is called a variable. Variable names are the names given to locations in memory. These locations can contain integer, real or character constants or a digit. In any language, the types of variable that it can support depend on …

Variables in C Read More »

C - Operators

Operators in C

Operators in C : An operator is simply a symbol that is used to perform operations. There can be many types of operations like arithmetic, logical, bitwise, etc. There are following types of operators to perform different types of operations in C language. Arithmetic Operators Relational Operators Shift Operators Logical Operators Bitwise Operators Ternary or …

Operators in C Read More »

C - Loops

Loops in C

Loops in C : The versatility of the computer lies in its ability to perform a set of instruction repeteadly. This involves repeating some portion of the program either a specified number of times or until a particular condition is being satisfied. This repetitive operation is done through a loop control statement. Why to use …

Loops in C Read More »

C - Functions

Functions in C

Functions in C : A function is a self-contained block of statements that perform a coherent task of some kind. Every C program can be thought of as a collection of these functions. As we noted earlier, using a function is something like hiring a person to do a specific job for you. Sometimes the …

Functions in C Read More »

C - Preprocessor

The C Preprocessor

The C Preprocessor : The preprocessor is exactly what its name implies. It is a program that processes our source program before it is passed to the compiler. Preprocessor commands from what can almost be considered a language within C language. We can certainly write C programs without knowing anything about the preprocessor or its …

The C Preprocessor Read More »

C - Arrays

ARRAYS IN C

Arrays in C : The C language provides a capability that enables the user to design a set of similar data types, called array. For understanding the arrays properly, let us consider the following program. No doubt, this program will print the value of x as 10. Because when a value 10 is assigned to …

ARRAYS IN C Read More »