Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
C C Array and String cpp-array

Difference between pointer and array in C?

Pointers are used for storing address of dynamically allocated arrays and for arrays which are passed as arguments to functions. In other contexts, arrays and pointe...
C C-Pointers pointer

Why C treats array parameters as pointers?

In C, array parameters are treated as pointers. The following two definitions of foo() look different, but to the compiler they mean exactly the same thing. It&#x201...
C C-Pointers cpp-array

Pointer vs Array in C

Most of the time, pointer and array accesses can be treated as acting the same, the major exceptions being: 1) the sizeof operator o sizeof(array) returns the amount ...
C C-Pointers cpp-double-pointer

Double Pointer (Pointer to Pointer) in C

Prerequisite : Pointers in C and C++ We already know that a pointer points to a location in memory and thus used to store address of variables. So, when we define a...
C C-Pointers pointer

How to declare a pointer to a function?

Well, we assume that you know what does it mean by pointer in C. So how do we create a pointer to an integer in C? Huh..it is pretty simple.. int * ptrInteger; /*We h...
C C Basics C-Pointers

void pointer in C / C++

A void pointer is a pointer that has no associated data type with it. A void pointer can hold address of any type and can be typcasted to any type. int a = 1...
C C-Pointers C

What are near, far and huge pointers?

These are some old concepts used in 16 bit intel architectures in the days of MS DOS, not much useful anymore. Near pointer is used to store 16 bit addresses means w...
C C-Pointers cpp-pointer

NULL pointer in C

At the very high level, we can think of NULL as null pointer which is used in C for various purposes. Some of the most common use cases for NULL are a) To initialize ...
C C-Pointers CPP-Functions

Function Pointer in C

In C, like normal data pointers (int *, char *, etc), we can have pointers to functions. Following is a simple example that shows declaration and function call using...
C C++ C-Pointers

Pointer to an Array Array Pointer

Prerequisite: Pointers Introduction Pointer to Array Consider the following program: #include<stdio.h>    int main() {   int a...

Subscribe to Our Newsletter