C – File System (I/O)

In this tutorial, you will learn about file handling in C. You will learn how to read from a file, write to a file. close a file and more. File pointers: It is not enough to just display the data on the screen. We need to save it because memory is volatile and its contents … Read more

Array in C

An array is a group or the collection of data having the same data-type stored in a contiguous memory location. It is a simple data structure format where the primitive type of data such as int, char, double, float, etc are stored and accessed randomly through their index number. It can also store the collection of derived … Read more

C – Passing Array to Function

Passing an array to function in the one-Dimensional array is done through an actual parameter and array variables with subscript are passed as formal arguments. While passing array only the name of the array is passed to the function. Same method is applied for the multi-dimensional array. There are three methods that can be used … Read more

Pointer to an Array in C

The basic idea of Pointer to an Array is that a pointer is used in with array that points to the address of the first element of that array. Before we begin, you need to have the knowledge of following C programming: Array in C Pointers in C Consider the following: In the above example, … Read more

C – Multi-Dimensional Array in C

What is Multi-Dimensional Array in C? In C programming, Multi-Dimensional Arrays refer to as array of arrays. This could be of 2D or 3D (two-dimensional or three-dimensional) Array. These arrays are stored in the form of a table (with rows and columns). The general form of multi-dimensional array: The data type must be a valid … Read more

C – Two Dimensional Array

What is Two Dimensional Array in C? Array with two subscripts is known as two dimensional Array. The 2D array is organized as the collection of rows and columns to form a matrix. 2D arrays are created to manipulate data structures. Example: int arr[][]; Declaration of 2D array. The following shows the syntax for declaring … Read more

C – One Dimensional Array

What is One Dimensional Array in C? An array with only one subscript is known as a one-dimensional array.Example: int arr[10]. Syntax: Declaration of 1D Array in C: For declaration, the programmer needs to specify the type of element and number of elements in an array. Certain rules for declaring One Dimensional Array The declaration must … Read more

C – Function

A function refers to a block of code that performs a specific task. We can divide and create a separate function in a program so that each function performs a different specific task and can be called as many times as needed in the program. At least one pre-defined function is always executed by the … Read more

C – Call by Value and Call by Reference with Example

There are two ways in which the argument can be passed through a function in C Programming. Call by Value Call by Reference Call by Value in C. In this method, the actual argument is copied to the formal parameter of the function. Hence any operation performed on the argument does not affect the actual … Read more

C – goto statement

goto statement in c allows the user in the program to jump the execution to the labeled statement inside the function. The label (tag) is used to spot the jump statement. NOTE: Remember the use of goto is avoided in programming language because it makes difficult to trace the control flow of a program, making … Read more