Data Types in C | Set 1

Data types define the type of data a variable can hold. C language has some predefined set of data types to handle various kinds of data that we can use in our program. These datatypes have different storage capacities. In C programming, data types are declarations for variables. This determines the type and size of data associated with… Read More »

Hello World Program in C

In this article, you will learn to print “Hello, World!” on the screen in C programming. Most students of programming languages, start from the famous ‘Hello World’ code. This program prints ‘Hello World’ when executed. In the first program we are displaying the message using printf function and in the second program we are calling a user defined… Read More »

C standard library

Prerequisite – C language C standard library (libc) is the standard library for the C programming language, as specified in the ANSI C standard. C standard library is also called the ISO C library. The C library functions are provided by the system and stored in the library. The C library function is also called an in-built function… Read More »

Functions in C

A function is a block of code that performs a specific task. It is a set of statements that take inputs, do some specific computation and produces output. A function can be called multiple times to provide reusability and modularity to the C program. Example : Advantage of functions in C : There are the following advantages of… Read More »

Loops in C | Set 2

Loops are very useful when you want to perform a task repeatedly. Loops are used to execute a set of statements repeatedly until a particular condition is satisfied. A loop consists of two parts, a body of a loop and a control statement. The purpose of the loop is to repeat the same code a number of times.… Read More »

Decision Making in C

C conditional statements allow you to make a decision, based upon the result of a condition. These statements are called Decision Making Statements or Conditional Statements. Decision making statements available in C are: if statement if..else statements nested if statements if-else-if ladder switch statements Jump Statements: break continue goto return 1. if statement – If a certain condition… Read More »

Storage Classes in C

Every variable in C programming has two properties: type and storage class. Type refers to the data type of a variable. And, storage class determines the scope, visibility and lifetime of a variable. Storage Classes are used to describe the features of a variable/function. These features basically include the scope, visibility and life-time which help us to trace… Read More »

Variables in C | Set 2

Prerequisite – Variables in C | Set 1 In programming, a variable is a container (storage area) to hold data. A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable in C has a specific type. That is, every variable declared must be assigned as a certain type of… Read More »

Operators in C

Operators are the foundation of any programming language. An operator is a symbol or a special character that tells the computer to perform certain mathematical or logical manipulations which is applied to operands to give a result. It can operate on integer and real numbers. For example, consider the below statement: c = a + b; Here, ‘+’… Read More »

Constants in C | Set 2

Prerequisite – Constants 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. Types of Constant in C : C supports several types of constants in C language as Character Constants, i.e., Single Character Constant,… Read More »