daily pastebin goal
84%
SHARE
TWEET

array arguments

a guest May 11th, 2013 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int snoopy(int x, int y[], const int z[])
  4. {
  5.     x = 5;
  6.     y[0] = 5;
  7.     z[0] = 5;      
  8.     return x + 10;
  9. }
  10.  
  11. int main(void)
  12. {
  13.     int a = 1;
  14.     int b[] = {1,2,3};
  15.     int c[] = {7,7,7};
  16.     int result;
  17.     result = snoopy(a,b,c);
  18.     printf("%d %d %d", a, b[0], result );
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top