Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- char foo(int n);
- //////////////////////////////////////
- int main()
- {
- char c = foo(0);
- printf("%c", c);
- c = foo(1);
- printf("%c", c);
- }
- ///////////////////////////////////////
- char foo(int n)
- {
- char nArr[10] = "SONY";
- return nArr[n];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement