zoi20

Untitled

Jan 24th, 2014
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. # include<stdio.h>
  2. int f1(int y)
  3. {
  4.     return y+5;
  5. }
  6.  
  7. int f2(int *p1)
  8. {
  9.     int y;
  10.     y=*p1++;
  11.     y+=*p1++;
  12.     y++;
  13.     return y;
  14. }
  15.  
  16. void f3(char *p, int z)
  17. {
  18.     *++p=z;
  19.     *p++='X';
  20.     p+=3;
  21.     *p=z;
  22. }
  23.  int main()
  24.  {
  25.      int Y[3][3]={1,2,3,4};
  26.      int X[4]=('A','B','C','D');
  27.      char z[12]="Washington";
  28.      int x=0, y=1;
  29.      y=Y[1][1]+X[2];
  30.      printf("%d\n",y);
  31.      y=f1(X[0]);
  32.      printf("%d\n",y);
  33.      y=f2(Y);
  34.      printf("%d\n",y);
  35.      f1(x);
  36.      printf("%d\n",x);
  37.      f3(z,X[2]);
  38.      printf("%s\n",z);
  39.      return 0;
  40.  }
Advertisement
Add Comment
Please, Sign In to add comment