2

普通程序员、文艺程序员、2B程序员

 3 years ago
source link: https://www.physixfan.com/%e6%99%ae%e9%80%9a%e7%a8%8b%e5%ba%8f%e5%91%98%e3%80%81%e6%96%87%e8%89%ba%e7%a8%8b%e5%ba%8f%e5%91%98%e3%80%812b%e7%a8%8b%e5%ba%8f%e5%91%98/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

普通程序员、文艺程序员、2B程序员

作者: physixfan

跟风发个这种蛋疼文体。

普通程序员

void swap(int &a,int &b)
{
    int temp;
    temp=a;
    a=b;
    b=temp;
}

文艺程序员

void swap(int &a,int &b)
{
    a=a^b;
    b=a^b;
    a=a^b;
}

2B程序员

void swap(int a,int b)
{
    int temp;
    temp=a;
    a=b;
    b=temp;
}

希望能引起广大苦逼的正在学或者已经学过c++人的共鸣和会心一笑吧。。

Related

Nim游戏的必胜策略和Xor运算的神奇应用November 5, 2009In "Interesting Maths"

我的宇宙观May 24, 2011In "Ideas"

佛说…March 20, 2010In "Ideas"

2 Comments Post a comment
  1. 没看懂。。。是因为2B程序员用的传值调用吗?

    Reply
  2. 人生苦短,我用Python

    Reply

Share your thoughts, post a comment.

Name (required) Email (required) Website Comment

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK