IHYPRESS PROGRAMMING
Tutorials and C programs with code and output for beginners
c programming
HOME | ASP | C | CSS | GNUPLOT | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
CData Types & Operators : Pointers and Indirection
<02.09>
/* Problem: This is just a silly program playing with pointers */ #include <stdio.h> int main (void) { /* a and e are integers */ int a, e; /* b is a pointer to an integer */ int* b; /* c is a pointer to a pointer to an integer */ int** c; /* d is a pointer to a pointer to a pointer to an integer */ int*** d; a = 25; /* a contains the integer 25 */ b = &a; /* b contains the address of a */ c = &b; /* c contains the address of b */ d = &c; /* d contains the address of c */ /* Do you understand that ***d is actually a? */ e = ***d * 2; printf ("%d", e); return (0); }
Hergestellt in Deutschland / Made in Germany
50
COPYRIGHT © 2015-2024 IHY PRESS Frankfurt am Main 60329 Deutschland