檢測你處於程序員的哪個層級
檢測你處於程序員的哪個層級
高中時期
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
檢測你處於程序員的哪個層級