C Program For Pointers
Get Certified in C Programming and Take Your Skills to the Next Level
Program 1
// Pointer Practical
#include<stdio.h>
#include<conio.h>
void main()
{
int a=10,*p,*r,b=50;
p=&a;
r=&b;
++*p; //a=11
++*r; //b=51
a=a+5; //a=16
b=b+5;//b=56
r=&a;
++*p; //a=17
++*r; // a=18
printf("a=%d b=%d *p=%d *r=%d ",a,b,*p,*r);
// p=&a;
// ++*p; //Value
// printf("\n\n %d \t %d ",a,*p);
// ++p; //Address
// printf(" \n\n %d \t %d ",a,*p);
// int a=10,*p,**r;
// p=&a;
// r=&p;
// printf("\nValue of a %d",a);
// printf("\nValue of p %u",p);
// printf("\nValue of *p %d",*p);
// printf("\nValue of r %u",r);
// printf("\nValue of *r %u",*r);
// printf("\nValue of **r %d",**r);
// ++**r;
// printf("\nValue of a %d",a);
}
We work very hard to provide you quality material
Could you take 15 seconds and share your happy experience on Google

