정말 기가 막히는 구나 ㅋㅋ;
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> int main(int c, char **v) { while(--c > 1 && !fork()); sleep(c = atoi(v[c])); printf("%d\n", c); wait(0); return 0; }
실행화면
같은 코드를 JS 코드로 하면..
(function(arr){ for(var i=0; i<arr.length; i++){ var n=arr[i]; setTimeout((function(n){ return function(){ console.log(n); } })(n), n); } })([10, 1, 4, 2, 6, 3, 8, 5]);
-
[ios] 최상위 ViewController 가져오기
-
[ios] 상위 ViewController 가져오기
-
[c] 기막힌 정렬 코드 ㅋㄷ
-
[linux] CentOS Apache 웹서버에 HTTPS 적용
-
[ios] ViewController Push할 때 애니메이션 효과
-
[ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기
-
[c] 한글 문자열 출력
-
[php] 한글 문자열 자르기 (utf-8)
-
[js] AngularJS 란?
-
[ios] How To Use UIScrollView to Scroll and Zoom Content (Using Objective-C)
-
[ios] How To Use UIScrollView to Scroll and Zoom Content (Using Swift)
-
[ios] Did UIScrollView End Scrolling?