Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void foo(char *psz);
- ////////////////////////////////////////////////////
- int main() //
- {
- char szArr[99] = "SONY";
- foo(szArr);
- }
- ////////////////////////////////////////////////////
- void foo(char *psz)
- {
- printf("%s \n", psz );
- printf("%d \n", psz );
- char *pc = 1638129;
- printf("%d \n", *pc);
- printf("%c \n", *psz );
- printf("%c \n", psz[0] );
- printf(" - - - - - - - - - - \n");
- for(int i = 0; i < 4; i++)
- {
- printf("%c \n", psz[i] );
- }
- }
- /*
- #include <stdio.h>
- char szArr[99] = "7ONY";
- ////////////////////////////////////////////////////
- int main() //
- {
- printf("szArr[0] = %d \n", szArr[0] );
- printf("szArr[1] = %d \n", szArr[1] );
- printf("szArr[2] = %c \n", szArr[2] );
- printf("szArr[3] = %c \n", szArr[3] );
- }
- */
- /*
- #include <stdio.h>
- int n;
- ////////////////////////////////////////////////////
- int main() //
- {
- n = 5;
- printf("size n = %d \n", sizeof(int) ); // размер
- printf(" n = %d \n", n ); // содержимое
- printf("address n = %d \n", &n ); // Адрес
- }
- */
- /*
- #include <stdio.h>
- char szArr[99] = "SONY";
- int foo_print();
- ////////////////////////////////////////////////////
- int main() //
- {
- printf("%d \n", foo_print() );
- }
- ////////////////////////////////////////////////////
- int foo_print()
- {
- printf("SONY \n");
- printf("%s kjhsdkajh \n", szArr);
- return 123 + 1;
- }
- */
- /*
- #include <stdio.h>
- char szArr[99] = "SONY";
- int foo_print();
- ////////////////////////////////////////////////////
- int main() //
- {
- int n = foo_print();
- printf("%d \n", n);
- }
- ////////////////////////////////////////////////////
- int foo_print()
- {
- printf("SONY \n");
- printf("%s kjhsdkajh \n", szArr);
- return 123 + 1;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement