write a c program to demonstrate handling of pointers in c,pointer in c programming,write a c program to demonstrate pointer concept,write a program in c to demonstrate the use of &(address of) and *(value at address) operator
Write a c program to demonstrate pointers
#include<stdio.h>
#include<conio.h>
void main()
{
int a, *iptr;
iptr=&a;
clrscr();
printf("Enter the value of a: ");
scanf("%d",&a);
printf("Address of a=%d\n",iptr);
printf("Value stored in a=%d",*iptr);
getch();
}
Output:
Enter the value of a: 2
Address of a=-12
No comments: