Category Archives: C

C Operators

C operators are symbols or keywords that are used to perform different operations on one or more values. In C programming language, operators are classified into several categories, including: 1. Arithmetic Operators: These operators are used to perform basic arithmetic operations such as addition, subtraction, multiplication, division, and modulus (%). Here is a list of all arithmetic operators… Read More »

Void Pointer in C

In C, a void pointer, also known as a generic pointer, is a pointer that can point to any type of data. The void type is a special type that represents the absence of any type. Therefore, a void pointer is a pointer that does not have any type associated with it. Declaring Void Pointer in C:: Here… Read More »

Double Pointer in C

In C, a double pointer is a variable that stores the address of a pointer. It is also known as a pointer-to-pointer. Double pointers are useful when you need to modify the value of a pointer itself, not just the value it points to. Declaring Double Pointer in C: Here is an example of how to declare a… Read More »

Function Pointer in C

In C programming language, a function pointer is a variable that holds the address of a function. It allows us to pass functions as arguments to other functions, store functions in arrays or structures, and call functions indirectly. Declaring Function Pointer in C: To declare a function pointer, you need to specify the return type and the parameter… Read More »

Null Pointer in C

In C programming language, a null pointer is a pointer that has a value of “null”, or “0”. A null pointer is a pointer that does not point to any memory location. It is often used to indicate that a pointer is not currently pointing to a valid memory location. Uses of NULL Pointer in C : Null… Read More »

Pointers in C

Pointers are a fundamental concept in the C programming language, which allow direct access to memory locations. A pointer is a variable that holds a memory address, which points to the location of a value in memory. Pointers are used to pass information between functions, dynamically allocate memory, and access data structures. In C, pointers are declared using… Read More »

String in C

In C programming language, a string is a sequence of characters that are stored in an array of characters. The string is terminated with a null character (‘\0’) which marks the end of the string. In C, strings are stored as arrays of characters, and each character in the array represents a character in the string. For example,… Read More »

Ways to define Constant in C

Prerequisite – Constants in C In C programming language, there are several ways to define a constant, depending on the type of constant and where it is used in the program. Here are the most common ways to define a constant in C: Using the “const” keyword – The “const” keyword can be used to define constants in… Read More »

Constants in C

Constants in C are fixed values that cannot be changed during program execution. They are declared using the keyword “const” and can be of various data types such as integer, floating point, character, or string. Constants provide a way to assign meaningful names to fixed values in a program, making the code more readable and maintainable. Constants can… Read More »

C Literals

In the C programming language, a literal is a value that appears directly in the source code. There are several types of literals in C, including: Integer literals – An integer literal is a whole number without a fractional component, such as 42 or -17. int a = 42; long b = -17; unsigned int c = 123456;… Read More »