Develop
2015.10.13 16:11
[c] 기막힌 정렬 코드 ㅋㄷ
조회 수 817 댓글 0
첨부 '1' |
|
---|
정말 기가 막히는 구나 ㅋㅋ;
#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]);
-
[android] 딜레이를 구현하기 위한 꼼수
-
[android] How can I place app icon on launcher home screen?
-
[android] Calling activity function from separate class
-
[Android Error] The number of method references in a .dex file cannot exceed 64K
-
[android] 레이아웃 사이즈 변경 (동적; programmatically)
-
[android] 초간단 얼럿 (AlertDialog)
-
[android] dp, px 서로 변환
-
[matlab] ZigZag-Scanning (2-D Array)
-
[matlab] 정보은닉 스테가노그래피(Steganography) 수업
-
[c] RSA 암호화 구현(gmp 라이브러리 활용)
-
[c] Mac OS 에 gmp(gmp.h) 라이브러리 설치
-
[c] 셀프 넘버(Self Number) 구하기