C Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start C Course
Register
Pointer Difference Demo
0
Author: Anubhav Mattoo
Dark
Public
Save
C
c
1
2
3
4
5
6
7
8
#include <stdio.h>
int main() {
int a=0,b=10;
int *p1=&a,*p2=&b;
printf("%ld",p1-p2);
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT