POINTERS AND FILE
MANAGEMENT
I. Pointer concepts - Pointers & Arrays
II. Structure concepts - Defining, Declaring,
Accessing Member Variables, Structure
within Structure
III. Union
IV. File Management in C- Dynamic Memory
Allocation
,POINTER CONCEPTS
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
⚫ type *var-name;
,EXAMPLE :
#include<stdio.h>
void main()
{
int number=50;
int *p;
p=&number;//stores the address of number variable
printf("Address of p variable is %x \n",p);
printf("Value of p variable is %d \n",*p);
}
,