Advertisement
Guest User

Untitled

a guest
Nov 28th, 2011
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. #include <signal.h>
  2. #include <stdint.h>
  3. #include <unistd.h>
  4.  
  5. uint32_t c = 0;
  6.  
  7. void alrm(int a) {
  8.         printf("%d\n", c);
  9.         exit(0);
  10. }
  11.  
  12. typedef float testtype;
  13.  
  14. int main(){
  15.         signal(SIGALRM, alrm);
  16.         alarm(10);
  17.  
  18.         testtype n;
  19.  
  20.         while (1) {
  21.                 n += n * n;
  22.                 ++c;
  23.         }
  24. }
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement