Programming In C Practical 24

Question 1
Write C program to access and display address of variables.
Pointer.cpp
C
				#include<stdio.h>
#include<conio.h>

void main()
{
	int x=50;
	char c='A';
	int *xptr;
	char *cptr;
	xptr=&x;
	cptr=&c;
	printf("\n The value Of X = %d",x);
	printf("\n The address of X = %u",xptr);
	printf("\n The value Of C = %c",c);
	printf("\n The address of C = %u",cptr);
	getch();
}
			
Output

Leave a Comment

Your email address will not be published. Required fields are marked *