Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int x = 1, w = 2, v = 3, u = 4, t = 5;
- int z[5] = { 6, 7, 8, 9, 10 };
- int *s = &x;
- int fungsi()
- {
- return 10;
- }
- int* fungsi1()
- {
- return &v;
- }
- int* fungsi2()
- {
- return &u;
- }
- int main()
- {
- int **a = &s;
- void *b = &w;
- int *c[5] = { &x, &w, &v, &u, &t };
- int (*d)[5] = &z;
- int (*e)() = fungsi;
- int *(*f[2])() = { fungsi1, fungsi2 };
- int i;
- printf("**a = %d\n", **a);
- printf("*b = %d\n", *((int*)b));
- printf("*c[2] = %d\n", *c[2]);
- printf("*d[2] = %d\n", (*d)[3]);
- printf("e() = %d\n", e());
- printf("(*f[0])() = %d\n", *(f[0])());
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement