fork(2) download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. void print_nb_of_items(const int nb_of_apple, const int& nb_of_pens)
  8. {
  9. cout << "Number of apples = " << nb_of_apple << endl;
  10. cout << "Number of pens = " << nb_of_pens << " Address = 0x" << uppercase << hex << uintptr_t(&nb_of_pens) << endl;
  11. cout << "Hex output in uppercase = " << uppercase << hex << 77 << endl;
  12. }
  13.  
  14. /* The main function */
  15.  
  16. int main(int argc, char * argv[])
  17. {
  18. int nb_apple = 24;
  19. int nb_pens = 65;
  20. print_nb_of_items(nb_apple, nb_pens);
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
Number of apples = 24
Number of pens = 65 Address = 0xBFD5767C
Hex output in uppercase = 4D