Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int MakeInteger(int localX)
  5. {
  6.     localX = 42;
  7.     return localX;
  8. }
  9.  
  10. int MakeChar(char localY)
  11. {
  12.     localY = 'B';
  13.     return localY;
  14. }
  15.  
  16. int main()
  17. {
  18.     int mainX = 0;
  19.     char mainY = '0';
  20.  
  21.     int MakeInteger_Returned = 0;
  22.     char MakeChar_Returned = '0';
  23.  
  24.     MakeInteger_Returned = MakeInteger(mainX);
  25.     MakeChar_Returned = MakeChar(mainY);
  26.  
  27.     printf("My integer variable in main is %i\n",mainX);
  28.     printf("My character variable in main is %c\n",mainY);
  29.  
  30.     printf("My returned value of MakeInteger is %i\n",MakeInteger_Returned);
  31.     printf("My returned value of MakeChar is %c\n",MakeChar_Returned);
  32.  
  33.     return 0;
  34. }