Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- char sz[19]="SONY_Pictures";
- //////////////////////////////////////////////////////////
- int main() //
- {
- int n = strlen(sz);
- for(int i=0; i < n; i++)
- {
- printf("%s\n", &sz[i]);
- }
- }
- // printf("%s\n",sz);
- // printf("%s\n",&sz[1]);
- /*
- #include <stdio.h>
- char sz[77] = "SONY_Pictures";
- ///////////////////////////////////////////////////////////////
- int main()
- {
- printf("%s\n", sz);
- printf("%s\n", &sz[1]);
- printf("%s\n", &sz[2]);
- return 0;
- }
- */
- /*
- printf("%c\n", *sz );
- printf("%c\n", sz[1]);
- printf("%c\n", sz[2]);
- printf("%c\n", sz[3]);
- printf("%d\n", sz[4]);
- */
- /*
- #include <stdio.h>
- char sz[7] = "SONY";
- ///////////////////////////////////////////////////////////////
- int main()
- {
- printf("%d\n", sz[0]);
- printf("%d\n", sz[1]);
- printf("%d\n", sz[2]);
- printf("%d\n", sz[3]);
- printf("%d\n", sz[4]);
- return 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement