xFactorSchool.com(Beta)
How to Do Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Editor
C Code Editor
C++ Code Editor
C# Code Editor
Java Code Editor
Python Code Editor
HTML Code Editor
CSS Code Editor
JavaScript Code Editor
Practice how to use pointer in C
C Online Editor
Execute Code
More C Sample Codes
#include <stdio.h> int main() { int numVariable = 30; // Declare an integer variable and assign it 30 as a value int *pointerVariable = &numVariable; // Declare a pointer variable and assign it the address of 'numVariable' // Print the value of the variable 'numVariable' printf("Value of numVariable: %d\n", numVariable); // Print the address of the variable 'numVariable' printf("Address of numVariable: %p\n", &numVariable); // Print the address of the variable 'numVariable' using the pointer variable 'pointerVariable' printf("Value of pointerVariable: %p\n", pointerVariable); // Print the value the variable 'numVariable' using pointer variable printf("Value pointed to by pointerVariable: %d\n", *pointerVariable); // Modify the value of 'numVariable' using the 'pointerVariable' *pointerVariable = 50; printf("New value of numVariable after modification through pointerVariable: %d\n", numVariable); return 0; }