Created
August 23, 2016 09:23
-
-
Save 1995hnagamin/8164d68b350e62fb39be95c2ec58082a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
int i = 0; | |
int const ci = 0; | |
int * pi; | |
pi = &i; | |
// pi = &ci; | |
int const * pci; | |
pci = &i; | |
pci = &ci; | |
int * * ppi; | |
// ppi = &pci; | |
ppi = π | |
int const * * ppci; | |
// ppci = π | |
ppci = &pci; | |
int const * const * pcpci; | |
pcpci = π | |
pcpci = &pci; | |
return 0; | |
} | |
void func1() { | |
int i = 0; | |
int * pi1 = &i; | |
int const * pci = pi1; | |
// int * pi2 = pci; | |
} | |
void func2() { | |
int i = 0; | |
int * pi = &i; | |
int const * * ppci; | |
// ppci = π | |
int const ci = 0; | |
*ppci = &ci; | |
*pi = 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment