检测你处于程序员的哪个层级
高中时期
view plaincopy to clipboardprint?
-
10 PRINT "HELLO WORLD"
-
20 END
大学新生
view plaincopy to clipboardprint?
-
program Hello(input, output)
-
begin
-
writeln(\‘Hello World\‘)
-
end.
高年级大学生
view plaincopy to clipboardprint?
-
#include <stdio.h>
-
-
int main(void)
-
{
-
printf("Hello, world!\\n");
-
return 0;
-
}
-
</stdio.h>
-
插播福利
1.赠送互联网领域技术图书(pdf),143家公司的面试真题,共计10T干货资源。获取方式:关注本公众号,回复“干货”。
2.免费微信交流群:包括健身群,运动群,交友群,学习群,求职群,讨论群,老乡群,学生群,校招群,跑步群,聚餐群 入群方式:关注本公众号,回复“入群”
职业新手
view plaincopy to clipboardprint?
-
#include <stdio.h>
-
void main(void)
-
{
-
char *message[] = {"Hello ", "World"};
-
int i;
-
-
for(i = 0; i < 2; ++i)
-
printf("%s", message[i]);
-
printf("\\n");
-
}
-
stdio.h>
职业老手
view plaincopy to clipboardprint?
-
#include <iostream>
-
#include <string>
-
using namespace std;
-
-
class string
-
{
-
private:
-
int size;
-
char *ptr;
-
-
string() : size(0), ptr(new char[1]) { ptr[0] = 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::operator=(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);
-
}
-
/string></iostream>
黑客学徒
#!/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;
有经验的黑客
view plaincopy to clipboardprint?
-
#include <stdio.h>
-
#define S "Hello, World\\n"
-
main(){exit(printf(S) == strlen(S) ? 0 : 1);}
-
stdio.h>
老练的黑客
% cc -o a.out ~/src/misc/hw/hw.c % a.out
超级黑客
% echo "Hello, world."
一线经理
view plaincopy to clipboardprint?
-
10 PRINT "HELLO WORLD"
-
20 END
中层经理
mail -s "Hello, world." bob@b12 Bob, could you please write me a program that prints "Hello, world."? I need it by tomorrow. ^D
高级经理
% zmail jim I need a "Hello, world." program by this afternoon.
首席执行官
% letter letter: Command not found. % mail To: ^X ^F ^C % help mail help: Command not found. % damn! !: Event unrecognized % logou