imk0tter
Aug 22nd, 2025
128
0
Never
This is comment for paste #include <stdio.h> void handle_open_...
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. void handle_open_port(unsigned int x);
  4. void handle_close_port(unsigned int x);
  5.  
  6. void kernel_recursion(unsigned int x, unsigned int y) {
  7.     handle_open_port(x);
  8.     if (x < y) kernel_recursion(x+1, y);
  9.     handle_close_port(x);
  10.  
  11. }
  12. void kernel(unsigned int y) {
  13.   kernel_recursion(0,y);
  14. }
  15.  
  16. int main() { kernel(100); }
  17.  
  18. void handle_open_port(unsigned int x) { printf("OPENING: %u\n", x); }
  19. void handle_close_port(unsigned int x) { printf("CLOSING: %u\n", x); }
Advertisement
Add Comment
Please, Sign In to add comment