My Subject Blog

C Program to Change Value of Variable Using Pointer

/*
Write a program to change the value of a variable using pointer. 
*/

#include <stdio.h>

int main(void) 
{
int i=10,*p;
p=&i;
printf("\n Value of I = %d",i);
*p=20;
printf("\n Value of I After Changing = %d",i);
return 0;
}

Comments

Most Visited Post

C Program to Find Largest Odd Number from Array

Followers