Pointers in C Programming

A pointer is a variable that stores the address of another variable. Unlike other variables that hold values of a certain type, pointer holds the address of a variable. For example, an integer variable holds (or you can say stores) an integer value, however an integer pointer holds the address of a integer variable. In … Read more

Structure in C programming

Structure is a group of variables of different data types represented by a single name. Lets say we need to store the data of students like student name, age, address, id etc. One way of doing this would be creating a different variable for each attribute, however when you need to store the data of … Read more

Function call by reference in C Programming

Before we discuss function call by reference, lets understand the terminologies that we will use while explaining this: Actual parameters: The parameters that appear in function calls. Formal parameters: The parameters that appear in function declarations. For example: We have a function declaration like this: int sum(int a, int b); The a and b parameters … Read more

Functions in C Programming

A function is a block of statements that performs a specific task. Suppose you are building an application in C language and in one of your program, you need to perform a same task more than once. In such case you have two options – a) Use the same set of statements every time you … Read more

Strings and String functions in c

String is an array of characters. In this post, we learn how to declare strings, how to work with strings in C programming and how to use the pre-defined string handling functions. We will see how to compare two strings, concatenate strings, copy one string to another & perform various string manipulation operations. We can … Read more

Two dimensional (2D) arrays in C programming

An array of arrays is known as 2D array. The two dimensional (2D) array in C programming is also known as matrix. A matrix can be represented as a table of rows and columns. Initialization of 2D Array There are two ways to initialize a two Dimensional arrays during declaration. int disp[2][4] = { {10, … Read more

Arrays in C programming

An array is a group (or collection) of same data types. For example an int array holds the elements of int types while a float array holds the elements of float types. How to declare Array in C int num[35];  /* An integer array of 35 elements */ char ch[10];  /* An array of characters … Read more

goto statement in c programming

The goto statement is rarely used because it makes program confusing, less readable and complex. Also, when this is used, the control of the program won’t be easy to trace, hence it makes testing and debugging difficult. goto statement When a goto statement is encountered in a C program, the control jumps directly to the … Read more

switch case statement in C Programming

The switch case statement is used when we have multiple options and we need to perform a different task for each option. Switch Case Statement Before we see how a switch case statement works in a C program, let’s checkout the syntax of it. switch (variable or an integer expression) { case constant: //C Statements … Read more

continue statement

The continue statement is used inside loops. When a continue statement is encountered inside a loop, control jumps to the beginning of the loop for next iteration, skipping the execution of statements inside the body of loop for the current iteration. Continue statement Syntax: continue; Flow diagram of continue statement