Pointer in C: Presented by Rana Das (B.Tech Cse) EN NO.A2345921028
Pointer in C: Presented by Rana Das (B.Tech Cse) EN NO.A2345921028
C
PRESENTED BY
RANA DAS[B.TECH CSE]
EN NO.A2345921028
POINTER
Pointer syntax:
data_type*var_name;
Example:
int*p; char*p;
DECLARING POINTER VARIABLE
data_type*pt_name;
INITIALIZATION OF POINTER
VARIABLE
#include<stdio.h>
Int main()
Output:
{
Int *ptr, q; //declaration 50
q=50;
ptr = &q; //initialization
printf(“%d”, *ptr); //display q’s value using ptr variable
printf(“%d”, *ptr);
return 0
}