游戏开发论坛

 找回密码
 立即注册
搜索
查看: 2440|回复: 6

笑话(编程相关)

[复制链接]

2

主题

8

帖子

8

积分

新手上路

Rank: 1

积分
8
发表于 2005-10-30 17:51:00 | 显示全部楼层 |阅读模式
two strings walk into a bar

One says to the bartender "Hi, i want some beerseawotwnaetlkn%#@$^@(#*!*(%^!#(*$^!(#*&%@&#YNASDKLVFNawlfhtwenawjkhtjwnefahweifnawelnfaklwnfklawhyrlawnrf&*^#*(@%
%)U&Q@#%JR{E#RWNME$ITHW$TW$N@
2352q
52abskjbfwe490r5u7wejafawerawefwe"

The other says "Sorry, my freind's not null terminated"


懒得翻译了,因为是编程相关的,就放到这个区了。

11

主题

162

帖子

189

积分

注册会员

Rank: 2

积分
189
QQ
发表于 2005-10-30 17:57:00 | 显示全部楼层

Re:笑话(编程相关)

Hello World !
How the way people code "Hello World" varies depending on their age and job:
High School/Jr.High

10 PRINT "HELLO WORLD"
20 END


First year in College

program Hello(input, output)
begin
writeln('Hello World')
end.


Senior year in College

(defun hello
(print
(cons 'Hello (list 'World))))


New professional

#include <stdio.h>

void main(void)
{
  char *message[] = {"Hello ", "World"};
  int i;
  for(i = 0; i < 2; ++i)
  printf("%s", message);
  printf("\n");
}


Seasoned professional

#include <iostream.h>
#include <string.h>
class string
{
  private:
   int size;
   char *ptr;
  public:
   string() : size(0), ptr(new char('\0')) {}
   string(const string &s) : size(s.size)
   {
     ptr = new char[size + 1];
     strcpy(ptr, s.ptr);
   }
   ~string()
   {
     delete [] ptr;
   }
   friend ostream &operator <<(ostream &, const string &);
   string &operator=(const char *);
};
                                                                     
ostream &operator<<(ostream &stream, const string &s)
{
   return(stream << s.ptr);
}
string &string:perator=(const char *chrs)
{
   if (this != &chrs)
   {
     delete [] ptr;
     size = strlen(chrs);
     ptr = new char[size + 1];
     strcpy(ptr, chrs);
   }
   return(*this);
}
int main()
{
   string str;
   str = "Hello World";
   cout << str << endl;
   return(0);
}


System Administrator

#include <stdio.h>
#include <stdlib.h>
main()
{
  char *tmp;
  int i=0;
  /* on y va bourin */
  tmp=(char *)malloc(1024*sizeof(char));
  while (tmp="Hello Wolrd"[i++]);
  /* Ooopps y'a une infusion ! */
  i=(int)tmp[8];
  tmp[8]=tmp[9];
  tmp[9]=(char)i;
  printf("%s\n",tmp);
}

Apprentice Hacker

#!/usr/local/bin/perl
$msg="Hello, world.\n";
if ($#ARGV >= 0) {
     while(defined($arg=shift(@ARGV))) {
         $outfilename = $arg;
         open(FILE, ">" . $outfilename) || die "Can't write $arg: $!\n";
         print (FILE $msg);
         close(FILE) || die "Can't close $arg: $!\n";
     }
} else {
     print ($msg);
}
1;

Experienced Hacker

#include <stdio.h>
#include <string.h>
#define S "Hello, World\n"
main(){exit(printf(S) == strlen(S) ? 0 : 1);}


Seasoned Hacker

% cc -o a.out ~/src/misc/hw/hw.c
% a.out
Hello, world.


Guru Hacker

% cat
Hello, world.

New Manager (do you remember?)

10 PRINT "HELLO WORLD"
20 END


Middle Manager

mail -s "Hello, world." bob@b12
Bob, could you please write me a program that prints "Hello, world."?
I need it by tomorrow.
^D


Senior Manager

% zmail jim
I need a "Hello, world." program by this afternoon.

Chief Executive

% letter
letter: Command not found.
% mail
To: ^X ^F ^C
% help mail
help: Command not found.
% damn!
!: Event unrecognized
% logout

Research Scientist

        PROGRAM HELLO
        PRINT *, 'Hello World'
        END

Older research Scientist

        WRITE (6, 100)
    100 FORMAT (1H ,11HHELLO WORLD)
        CALL EXIT
        END

2

主题

8

帖子

8

积分

新手上路

Rank: 1

积分
8
 楼主| 发表于 2005-10-30 18:02:00 | 显示全部楼层

Re:笑话(编程相关)

hahahahahahha,
谢谢楼上的,还有吗?

0

主题

61

帖子

63

积分

注册会员

Rank: 2

积分
63
发表于 2005-10-31 15:22:00 | 显示全部楼层

Re:笑话(编程相关)

hehe

59

主题

1104

帖子

1199

积分

金牌会员

Rank: 6Rank: 6

积分
1199
发表于 2005-10-31 16:31:00 | 显示全部楼层

Re:笑话(编程相关)

Some jokeful comments in c++ found myself when reading some opensource code:

1,
#ifndef TONY_WRITTEN_AT_2003_5_03
mother ****er, who moves my code.
-Tony
#endif

2,
/*
@@@@@@@DON'T FUCK WITH THESE CODES, IT WORKS@@@@@@
*/

3,
/*
************************
*   Want free pics/movies?   *
*   Please call 01-12345678  *
************************
*/

4,
// Update by John.Carman on 2002-01-03
// Commments:
// Dont worry dudes, I did nothing for this upgrade
// just wanna mark my name in this project

63

主题

871

帖子

891

积分

高级会员

Rank: 4

积分
891
QQ
发表于 2005-10-31 19:53:00 | 显示全部楼层

Re:笑话(编程相关)

不太好笑

63

主题

871

帖子

891

积分

高级会员

Rank: 4

积分
891
QQ
发表于 2005-10-31 19:58:00 | 显示全部楼层

Re:笑话(编程相关)

??头没了
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-22 11:49

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表