Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- ////////////////////////////////////////////////////
- int main() //
- {
- char sz[99];
- sprintf(sz, "Pictures = %d", 71);
- printf("SONY %s", sz);
- }
- /*
- #include <stdio.h>
- int _strlen(char *ghfhgfghf);
- ////////////////////////////////////////////////////
- int main() //
- {
- char nArr[99] = "S0NY Pictures";
- nArr[6] = '\0';
- int n2 = _strlen(nArr);
- printf("n2 = %d\n", n2);
- }
- ////////////////////////////////////////////////////
- int _strlen(char *p) //
- {
- int n = 0;
- while(p[++n] != 0);
- return n;
- }
- */
- //if(p[++n] == 0) break;
- /*
- #include <stdio.h>
- int _strlen(char *ghfhgfghf);
- ////////////////////////////////////////////////////
- int main() //
- {
- char nArr[99] = "S0NY Pictures";
- nArr[6] = '\0';
- int n2 = _strlen(nArr);
- printf("n2 = %d\n", n2);
- }
- ////////////////////////////////////////////////////
- int _strlen(char *p)
- {
- int n = 0;
- for(int i = 0; i < 100; i++)
- {
- if(p[i] == 0) break;
- n ++;
- }
- return n;
- }
- */
- /*
- #include <stdio.h>
- ////////////////////////////////////////////////////
- int main() //
- {
- char nArr[99] = "S0NY Pictures";
- nArr[6] = '\0';
- printf("%s\n", &nArr[0]);
- for(int i = 0; i < 14; i ++)
- {
- printf("i = %2d, %c\n", i, nArr[i]);
- }
- }
- */
- /*
- #include <stdio.h>
- #include <string.h>
- void foo(char*);
- ////////////////////////////////////////////////////
- int main() //
- {
- char nArr[] = "SONY Pictures";
- foo(nArr);
- return 0;
- }
- ////////////////////////////////////////////////////
- void foo(char *nArr) //
- {
- int nLen = strlen(nArr);
- for(int i = 0; i < nLen; i++)
- {
- if(i%2 == 0) printf("%c",nArr[i]);
- }
- }
- */
- /*
- #include <stdio.h>
- #include <string.h>
- void foo(char*, int);
- ////////////////////////////////////////////////////
- int main() //
- {
- char nArr[] = "SONY Pictures";
- int len = strlen(nArr);
- foo(nArr, len);
- return 0;
- }
- ////////////////////////////////////////////////////
- void foo(char *nArr, int len) //
- {
- for(int i = 0; i < len; i++)
- {
- if(i%2 == 0) printf("%c",nArr[i]);
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement