A program to declare a POINTER and to explain the initialization of pointer
C Programming Language 099
- Write a program to declare a POINTER and to explain the initialization of pointer
Program
#include <stdio.h>
void main()
{
int a, *p;
p = &a;
printf("Enter a number: ");
scanf("%d", p);
printf("a = %d", a);
printf("\n");
}
Result
Enter a number: 123
a = 123
Last Updated on
Comments