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
//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:
Post a Comment