Advertisement
DavidsonDFGL

multi2.c

Nov 17th, 2019
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdint.h>
  3.  
  4. uint64_t numb1 = 1;
  5. uint64_t numb2 = 2;
  6. uint64_t numb3 = 3;
  7. uint64_t numb4 = 4;
  8. uint64_t numb5 = 5;
  9.  
  10. char array[40000];
  11.  
  12. //time valgrind --tool=callgrind --dsymutil=yes ./pbd ./multi2 multi
  13. //callgrind_annotate --auto=yes callgrind.out.9742 > out
  14.  
  15. void multi(int n)
  16. {
  17.     for (int i = 0; i < n; i++)
  18.     {
  19.         if (i == n - 1)
  20.         {
  21.             numb1 += 7;
  22.             numb2 += 8;
  23.             numb3 += 9;
  24.             numb4 += 10;
  25.             numb5 += 11;
  26.             array[39999] = numb1;
  27.         }
  28.     }
  29. }
  30.  
  31. int main()
  32. {
  33.     multi(100000);
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement