Skip to main content

Simple Pointer Example Program

1 min read
Share:
On this page (5sections)

About this program

This is an example program in c pointer example programs. Read the concept first: C Pointers, then study the code and output below.

Initialization Of Pointer Vaibale:

Poniter Syntax:

pointer_vaibale = &variable;

Example Pointer Program:

#include<stdio.h> 
#include<conio.h> 

void main() 
{ 
	// Declare Pointer Variable
	int i=10; 
	int *Ptr; 
	
	// Assign Pointer Variable
	Ptr=&i; 
	
	// Display Pointer Variable
	printf("\nValue Of i :%d",i); 
	printf("\nAddress Of i :%d",&i); 
	printf("\nValue Of Ptr :%d",Ptr); 
	printf("\nAddress Of Ptr :%d",&Ptr); 
	printf("\nPtr's Pointer Value:%d",*Ptr); 
	printf("\nPtr Equal to &i :%d",*(&i)); 
} 

Learn the concept first, then study the code:

Related Tutorials

Search tutorials