CodesJava

Easy learning with example program codes

C Pointer to Pointer


C pointers can be defined as a variable, pointing towards the address of a value. When a pointer refers to the address of another pointer, it is called as Pointer to Pointer in C.

Syntax:

Data_type **variable_Name;

Example:

#include<stdio.h>
 
void main()
{  
int n = 60784; 	 
int *a;
int **b;    
a = &n;    
b = &a;    
 
printf("n = %d \n",n); 	 
printf("a = %x \n",a);
printf("b = %x \n",b);
printf("&n = %x \n",a);
printf("&a = %x \n",b);
}

Output

n = 60784
a = fef63734
b = fef63738
&n = fef63734
&a = fef63738
Posted in C   
Sign Up/ Sign In
Ask a Question


Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at hr@codesjava.com.

Development

We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on hr@codesjava.com.

Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki