Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Saturday, February 19, 2011

C24 : Enter a number and print it by using pointer

Back to Home   &  C


//Program to enter a number and print it by using a pointer


#include<stdio.h>
#include<conio.h>
void main()
{
int a,*p;
clrscr();
printf("Enter a number\n");
scanf("%d",&a);
p=&a;
printf("Variable Value by using pointer=%d\n",*p);
getch();
}
--------------------------------------------------
Output
Enter a number
12
Variable value by using pointer=12
===============================================
Back to Home   &  C

No comments: