Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- char sz[5] = "SONY";
- //////////////////////////////////////////////////////////
- int main() //
- {
- char c = sz[1];
- printf("%d\n", c);
- printf("%d\n", &sz[1]);
- printf("%d\n", &sz[2]);
- }
- /*
- #include <stdio.h>
- char sz[5] = "SONY";
- //////////////////////////////////////////////////////////
- int main() //
- {
- printf("%c\n", sz[0]);
- printf("%c\n", sz[1]);
- printf("%c\n", sz[2]);
- printf("%c\n", sz[3]); goto L_01;
- L_01:
- return 0;
- }
- */
- /*
- #include <stdio.h>
- int n = 105;
- char sz[5] = "SONY";
- //////////////////////////////////////////////////////////
- int foo() //
- {
- return 12;
- }
- //////////////////////////////////////////////////////////
- int main() //
- {
- printf("foo = %d\n", foo());
- }
- */
- /*
- #include <stdio.h>
- int n = 105;
- char sz[5] = "SONY";
- //////////////////////////////////////////////////////////
- int main() //
- {
- int i = 0;
- L_01: printf("%2d\n", sz[i]);
- i++;
- if(i < 5) goto L_01;
- return 0;
- }
- */
- /*
- #include <stdio.h>
- int n = 105;
- char sz[4] = "JVC";
- //////////////////////////////////////////////////////////
- int main() //
- {
- for(int i = 0; i < 4; i=i+1)
- {
- printf("%2d\n", sz[i]);
- }
- }
- */
- /*
- #include <stdio.h>
- int n = 105;
- char sz[114] = "JVC";
- //////////////////////////////////////////////////////////
- int main() //
- {
- printf("size of %d", sizeof(char));
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement