GridVids
Sign in with YouTube

C Programming Tutorial #13 Pointers in C | Explained with Example

Mark watched
Don't Miss
Hide
Open in popup Open on YouTube

Xoviabcs 8 years ago
Chapters

C Programming Tutorial #13 Pointers in C | Explained with Example Welcome to the 13th lecture of c programming with data structures and algorithm. In this tutorial we will learn about Pointers in C programming language. A pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location. Like any variable or constant, you must declare a pointer before using it to store any variable address. Pointers are themselves variables that store the address of a memory location - The memory required by a pointer depends upon the size of the memory in the machine - one byte could address a memory of 256 locations - two bytes can address a memory of 64K locations - four bytes can address a memory of 4G locations - modern machines have RAM of 1GB or more… - The task of allocating this memory is best left to the system

Pointer variable – precede its name with an asterisk - Pointer type - the type of data stored at the address we will be storing in our pointer. For example, int *p; - p is the name of the variable - The ‘*’ informs the compiler that we want a pointer variable - Sets aside however many bytes is required to store an address in memory. - The int says that we intend to use our pointer to point to an integer value

C Programming Tutorial/ Lectures/ Course with Data Structures & Algorithms @ https://goo.gl/K6VbgL Machine Learning Complete Tutorial/Lectures/Course from IIT (nptel) for GATE @ https://goo.gl/AurRXm Discrete Mathematics for Computer Science for GATE @ https://goo.gl/YJnA4B (IIT Lectures for GATE) Best Programming Courses @ https://goo.gl/MVVDXR Operating Systems Lecture/Tutorials from IIT for GATE CSE @ https://goo.gl/GMr3if MATLAB Tutorials for GATE @ https://goo.gl/EiPgCF