Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- #include <stdio.h>
- #include <string.h>
- void foo(char* p);
- /////////////////////////////////////////////////////////////
- int main()
- {
- char nArr[18] = "SONY Pictures";
- foo( nArr);
- printf("%s", nArr);
- }
- /////////////////////////////////////////////////////////////
- void foo(char *p)
- {
- int nL = strlen(p) - 1;
- char b = p[0 ];
- p[0] = p[nL];
- p[nL] = b ;
- }
- */
- /*
- for (int i = 0; i<4; i++)
- {
- b = *p;
- p[i] = b;
- printf("%c", p[i-8]);
- }
- */
- /*#include <stdio.h>
- #include <string.h>
- void foo(char* p);
- ///////////////////////////////////////////////////
- int main()
- {
- char nArr[55] = "SONY Pictures";
- foo(nArr);
- }
- ///////////////////////////////////////////////////
- void foo(char* p)
- {
- int nL = strlen(p);
- nL--;
- for(int i = nL; i >-1; i--)
- {
- printf("%c", p[i]);
- }
- }
- */
- /*
- #include <stdio.h>
- void foo(char* p);
- ///////////////////////////////////////////////////
- int main()
- {
- char nArr[55] = "Pictures";
- foo(nArr);
- }
- ///////////////////////////////////////////////////
- void foo(char* p)
- {
- for(int i = 3; i >-1; i--)
- {
- printf("%c", p[i]);
- }
- }
- */
- /*
- #include <stdio.h>
- void foo(char* p);
- ///////////////////////////////////////////////////
- int main()
- {
- char nArr[5] = "SONY";
- foo(nArr);
- }
- ///////////////////////////////////////////////////
- void foo(char* p)
- {
- for(int i = 3; i >-1; i--)
- {
- printf("%c", p[i]);
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement