是不是真的懂C? 看看这行code, (转载)

H
Huangchong
楼主 (未名空间)

【 以下文字转载自 Military 讨论区 】
发信人: bingya (bing), 信区: Military
标 题: 是不是真的懂C? 看看这行code,
发信站: BBS 未名空间站 (Mon Jun 15 18:40:20 2020, 美东)

就能辨别出真懂/假懂

local = (char *(*)()) inc_1;
n
ne5234

这行字可以当密码用

【 在 Huangchong (净坛使者) 的大作中提到: 】
: 【 以下文字转载自 Military 讨论区 】
: 发信人: bingya (bing), 信区: Military
: 标 题: 是不是真的懂C? 看看这行code,
: 发信站: BBS 未名空间站 (Mon Jun 15 18:40:20 2020, 美东)
:
: 就能辨别出真懂/假懂
:
: local = (char *(*)()) inc_1;
n
newsguy


所懂 c的被抛弃了。

【 在 Huangchong (净坛使者) 的大作中提到: 】
: 发信人: bingya (bing), 信区: Military
: 标 题: 是不是真的懂C? 看看这行code,
: 发信站: BBS 未名空间站 (Mon Jun 15 18:40:20 2020, 美东)
: 就能辨别出真懂/假懂
: local = (char *(*)()) inc_1;

x
xykkkk

a pointer pointing to a function which takes void parameter and return char *.
convert inc_1 to such pointer and assign to local
d
daemonself

写出这种sb code的人只能是懂个jb
【 在 ne5234 (Nessun Dorma) 的大作中提到: 】
: 这行字可以当密码用

M
MaLaRabbit

哈哈,一般要先定义一个function type吧,否则太搞了

【 在 Huangchong (净坛使者) 的大作中提到: 】
: 【 以下文字转载自 Military 讨论区 】
: 发信人: bingya (bing), 信区: Military
: 标 题: 是不是真的懂C? 看看这行code,
: 发信站: BBS 未名空间站 (Mon Jun 15 18:40:20 2020, 美东)
:
: 就能辨别出真懂/假懂
:
: local = (char *(*)()) inc_1;
r
renjing


cast inc_1 into pointer to function returning pointer to char

人和畜生的区别之一是 能制造和使用工具

【 在 Huangchong (净坛使者) 的大作中提到: 】
: 发信人: bingya (bing), 信区: Military
: 标 题: 是不是真的懂C? 看看这行code,
: 发信站: BBS 未名空间站 (Mon Jun 15 18:40:20 2020, 美东)
: 就能辨别出真懂/假懂
: local = (char *(*)()) inc_1;

x
xaa7

这个好像是某人告当年的sun software侵权官司里的一段
sun的专家证人在庭上作证sun的code虽然逻辑相似,但不是identical copy
律师从code中抽出这么一行,问这个专家证人,你能解释下这行code嘛意思, 证人说对不起 coding不是我的专长。
d
daemonself

Default Re: Fenwick & West LLP loses copyright jury trial
Quote:
Originally Posted by Congrats View Post
Wonder how many millions Chordiant spent on Fenwick & West LLP to get
this verdict. It was reported on some Chinese site they paid Faillace
and Lynde $700k for their expert reports. And Lynde testified that
Chordiant lost $18m. It seems that the jury didn't believe Chordiant's
plea of poverty.

Will this verdict lead to FBI raids?
Also, the story on the web goes that the said the Oxford Ph.D. hired
by Chordiant as tech expert was an expert in computer languages,
designed Pentium CPUs for Intel and Sun operating systems. And he was
bad mouthing Dr. Yue's work. And Dr. Yue showed him one line of C code
as follows:

local = (char *(*)()) inc_1;

The Oxford Ph.D. spent 10 minutes under oath and had no clue what it
was.

Then Dr. Yue wrote in rebuttal that the Oxford Ph.D. does not have the
expertise level of the community college graduate.

【 在 xaa7 (xaa) 的大作中提到: 】
: 这个好像是某人告当年的sun software侵权官司里的一段
: sun的专家证人在庭上作证sun的code虽然逻辑相似,但不是identical copy
: 律师从code中抽出这么一行,问这个专家证人,你能解释下这行code嘛意思, 证人说对
: 不起 coding不是我的专长。

t
tns

最简单的函数指针类型转换吧,c的基本功,这个不懂那signal 怎么用

【 在 Huangchong (净坛使者) 的大作中提到: 】
: 发信人: bingya (bing), 信区: Military
: 标 题: 是不是真的懂C? 看看这行code,
: 发信站: BBS 未名空间站 (Mon Jun 15 18:40:20 2020, 美东)
: 就能辨别出真懂/假懂
: local = (char *(*)()) inc_1;

n
ne5234

嘿嘿

【 在 daemonself (新晋川粉,前mit行为艺术专业博士后导师) 的大作中提到: 】
: Default Re: Fenwick & West LLP loses copyright jury trial
: Quote:
: Originally Posted by Congrats View Post
: Wonder how many millions Chordiant spent on Fenwick & West LLP to get
: this verdict. It was reported on some Chinese site they paid Faillace
: and Lynde $700k for their expert reports. And Lynde testified that
: Chordiant lost $18m. It seems that the jury didn't believe Chordiant's
: plea of poverty.
:
: Will this verdict lead to FBI raids?
: Also, the story on the web goes that the said the Oxford Ph.D. hired
: by Chordiant as tech expert was an expert in computer languages,
: designed Pentium CPUs for Intel and Sun operating systems. And he was
: bad mouthing Dr. Yue's work. And Dr. Yue showed him one line of C code
: as follows:
:
: local = (char *(*)()) inc_1;
:
: The Oxford Ph.D. spent 10 minutes under oath and had no clue what it
: was.
:
: Then Dr. Yue wrote in rebuttal that the Oxford Ph.D. does not have the
: expertise level of the community college graduate.
:
:
: 【 在 xaa7 (xaa) 的大作中提到: 】
: : 这个好像是某人告当年的sun software侵权官司里的一段
: : sun的专家证人在庭上作证sun的code虽然逻辑相似,但不是identical copy
: : 律师从code中抽出这么一行,问这个专家证人,你能解释下这行code嘛意思, 证人说对
: : 不起 coding不是我的专长。
d
daemonself

是你么?
【 在 ne5234 (Nessun Dorma) 的大作中提到: 】
: 嘿嘿
: 说对

q
qinfhome

不错,很牛啊。