C Pointer

A pointer is used to store the address of any variable.it directly point the memory location.
By using pointer, we can work faster on memory than a variable.

int a=5;
(i) it reserve space of integer to hold memory.
(ii) The Memory location is a.
(iii) the value at memory location is 5.

Pointer in C Language

#include<stdio.h>
#include<conio.h>

int main()
{
int a=5;

printf(“Address of a=%u\n”,&a);
printf(“The value of a is=%d\n”,a);
getch();
}

#include<stdio.h>
#include<conio.h>

int main()
{
int a=5;
a=7

printf(“Address of a=%u\n”,&a);
printf(“The value of a is=%d\n”,a);
getch();
}




Follow Us

Contact Us

tutorialworldin@yahoo.com

Back to Top