1. 程式人生 > >檢測你處於程序員的哪個層級

檢測你處於程序員的哪個層級

del ++ 方式 str output text bbed man 聯網

檢測你處於程序員的哪個層級

2018-02-15 陳皓 程序員幹貨站

高中時期

view plaincopy to clipboardprint?

  1. 10 PRINT "HELLO WORLD"

  2. 20 END

大學新生

view plaincopy to clipboardprint?

  1. program Hello(input, output)

  2. begin

  3. writeln(\‘Hello World\‘)

  4. end.


高年級大學生

view plaincopy to clipboardprint?

  1. #include <stdio.h>

  2. int main(void)

  3. {

  4. printf("Hello, world!\\n");

  5. return 0;

  6. }

  7. </stdio.h>

  1. 插播福利

1.贈送互聯網領域技術圖書(pdf),143家公司的面試真題,共計10T幹貨資源。獲取方式:關註本公眾號,回復“幹貨”。

2.免費微信交流群:包括健身群,運動群,交友群,學習群,求職群,討論群,老鄉群,學生群,校招群,跑步群,聚餐群 入群方式:關註本公眾號,回復“入群

職業新手

view plaincopy to clipboardprint?

  1. #include <stdio.h>

  2. void main(void)

  3. {

  4. char *message[] = {"Hello ", "World"};

  5. int i;

  6. for(i = 0; i < 2; ++i)

  7. printf("%s", message[i]);

  8. printf("\\n");

  9. }

  10. stdio.h>

職業老手

view plaincopy to clipboardprint?

  1. #include <iostream>

  2. #include <string>

  3. using namespace std;

  4. class string

  5. {

  6. private:

  7. int size;

  8. char *ptr;

  9. string() : size(0), ptr(new char[1]) { ptr[0] = 0; }

  10. string(const string &s) : size(s.size)

  11. {

  12. ptr = new char[size + 1];

  13. strcpy(ptr, s.ptr);

  14. }

  15. ~string()

  16. {

  17. delete [] ptr;

  18. }

  19. friend ostream &operator <<(ostream &, const string &);

  20. string &operator=(const char *);

  21. };

  22. ostream &operator<<(ostream &stream, const string &s)

  23. {

  24. return(stream << s.ptr);

  25. }

  26. string &string::operator=(const char *chrs)

  27. {

  28. if (this != &chrs)

  29. {

  30. delete [] ptr;

  31. size = strlen(chrs);

  32. ptr = new char[size + 1];

  33. strcpy(ptr, chrs);

  34. }

  35. return(*this);

  36. }

  37. int main()

  38. {

  39. string str;

  40. str = "Hello World";

  41. cout << str << endl;

  42. return(0);

  43. }

  44. /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?

  1. #include <stdio.h>

  2. #define S "Hello, World\\n"

  3. main(){exit(printf(S) == strlen(S) ? 0 : 1);}

  4. stdio.h>

老練的黑客

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

超級黑客

  % echo "Hello, world."

一線經理

view plaincopy to clipboardprint?

  1. 10 PRINT "HELLO WORLD"

  2. 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

檢測你處於程序員的哪個層級