Advertisement
harissel22

Untitled

Feb 16th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2. int a(int y)
  3. {
  4. return y-2;
  5. }
  6. int b(int* p)
  7. {
  8. int y;
  9. y=*p++;
  10. y++;
  11. y+=*p--;
  12. return y;
  13. }
  14. void c(char *p, int z)
  15. {
  16. *++p=z;
  17. *p++='-';
  18. p++;
  19. *p--=z;
  20. }
  21. int main()
  22. {
  23. int X[2][2]={1,9,17,25};
  24. char Y[4]={'O','P','Q','R'};
  25. char z[9]="Sarajevo";
  26. int y,x=1;
  27. y=X[1][1]+Y[1];
  28. printf("%d\n",y);
  29. y=a(Y[1]);
  30. printf("%d\n",y);
  31. y=b(X);
  32. printf("%d\n",y); // 11
  33. a(x);
  34. printf("%d\n",x);
  35. c(z,Y[2]);
  36. printf("%s\n",z);
  37. return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement