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]);
-
[ios] SBCampanion App 초안
-
[ios] WWDC 2015 샘플 소스 코드 통합파일
-
[ios] Touch ID 적용 샘플 코드 (예제)
-
Aspect Oriented Programming in Objective-C
-
[ios] 여러 버전의 Xcode 사용하기
-
정리할 자료.
-
[swift] 실행시간 측정하기
-
[js] Text 값을 클립보드에 복사하기
-
[matlab] 정보은닉 스테가노그래피(Steganography) 수업
-
[android] Android N requires the IDE to be running with Java 1.8 or later 오류
-
[ios] 비디오,네트워크,소셜로그인 테스트
-
[Javascript][Ajax] 자바스크립트 강의 산출물