Advertisement
dllbridge

Untitled

Sep 16th, 2024
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1.  
  2.  
  3.  
  4. #include  <stdio.h>
  5. #include <string.h>
  6.  
  7. char foo(int n);
  8.  
  9. //////////////////////////////////////
  10. int main()
  11. {
  12.    
  13.     char c = foo(0);
  14.    
  15.     printf("%c", c);
  16.    
  17.          c = foo(1);
  18.          
  19.     printf("%c", c);    
  20. }
  21.  
  22.  
  23. ///////////////////////////////////////
  24. char foo(int n)
  25. {
  26.     char   nArr[10] = "SONY";
  27.    
  28.     return nArr[n];
  29. }
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement