C – Frequently Asked Question/Interview Questions

This is an article prepared for you to answer all the frequently asked questions (short or long) in C and more. This listed FAQ is also prepared for interview questions that you may prepare through it. Not only about C but also about the compilers and headers used, etc. Although right now only a few … Read more

C – Storage Class

Every variable has a storage class that defines the characteristics of the variable. It tells the compiler where to allocate memory for a variable, it also determines the scope of the variable, visibility, and lifetime of a variable. There are four types of storage classes: Automatic External Static Register Automatic(auto) Storage class: A variable defined … Read more

C – Dynamic Memory Allocation

In this tutorial, you will learn how to dynamically allocate memory in C program using 4 standard library functions: malloc(), calloc(), free() and realloc() with examples. You will also learn the difference between malloc and calloc at the end. Dynamic Memory Allocation The main concept of dynamic memory allocation in c programming enables the programmer … Read more

C – Preprocessors

As the “pre” means beforehand, similarly it means processing something before passing it on further. The preprocessor is a program that processes the source program before it is passed to the compiler. So we can say that it is a separate process in the compilation. Preprocessor commands (often known as directives) form what can almost … Read more

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