زنگ تفریح برای برنامه نویس ها!

خروجی برنامه زیر چیست؟

 

int x =10;
printf("%d %d", x, x++);

احتمالا فکر میکنید که خروجی "10 10" خواهد بود.
به خروجی برنامه دقت کنید. چرا عدد 11 در خروجی چاپ شده است؟ و عجیب تر اینکه چرا ابتدا 11 چاپ شده!!!

Program Output

جوک برای برنامه نویس ها!

“Knock, knock.”
“Who’s there?”
very long pause …. “Java.”


There are only 10 kinds of people in this world: those who know binary and those who don’t!


"640 KB ought to be enough for anybody."
– Bill Gates, 1981.

ought: می بایست - باید


Two strings walk into a bar and sit down.
The bartender says, “So what’ll it be?” The first string says, “I think I’ll have a beer quag fulk boorg jdk^CjfdLk jk3s d#f67howe%^U r89nvy~~owmc63^Dz x.xvcu”
“Please excuse my friend,” the second string says, “He isn’t null-terminated.”

bartender: کسی که در بار مشروبات برای مشتریان می ریزد


A guy is standing on the corner of the street smoking one cigarette after another.
A lady walking by notices him and says: "Hey, don't you know that those things can kill you? I mean, didn't you see the giant warning on the box?!",
"That's OK" says the guy, puffing casually "I'm a computer programmer" "So? What's that got to do with anything?" "We don't care about warnings. We only care about errors."


"I think there is a world market for may be five computers."
– Thomas Watson, chairman of IBM, 1943.


"There is no reason anyone would want a computer in their home."
– Ken Olson, president, chairman and founder of Digital Equipment Corp.,1977.


A mathematician, a physicist, an engineer and a computer scientist are given an identical problem: Prove that all odd numbers greater than 2 are prime numbers.

They proceed:
Mathematician: 3 is a prime, 5 is a prime, 7 is a prime, 9 is not a prime - counterexample - claim is false.

Physicist: 3 is a prime, 5 is a prime, 7 is a prime, 9 is an experimental error, 11 is a prime, ...

Engineer: 3 is a prime, 5 is a prime, 7 is a prime, 9 is a prime, 11 is a prime, ...

Computer Scientist: 1 is a prime, 1 is a prime, 1 is a prime, 1 is a prime, ... Yes, they're all primes !!!

prime: عدد اول


How many programers dose it take to change a light bulb? None – It’s a hardare problem!