C Programs

C Program on Using a pointer variable



In this post, you will learn how to implement a C Program on Using a pointer variable

#include<stdio.h>
#include<stdlib.h>
int main(void) {
	//Declarations
		int size = 15;
		int *ptr;
		ptr = &size;

	//Use the value at the address stored in the pointer
		printf("Address %x contains %d", ptr, *ptr);

	return EXIT_SUCCESS;
}

Join The Discussion