返回   华枫论坛 > ◆ 工作学习◆ > 工作求职



发表新主题 回复
 
只看楼主 主题工具
旧 Jan 13th, 2005, 18:29     #1
markriver
Senior Member
级别:1 | 在线时长:7小时 | 升级还需:5小时
 
注册日期: Jul 2004
帖子: 334
markriver will become famous soon enough
默认 (ZT)If you can correctly answer the following, you are guaranteed an interview:

闲人玩玩
If you can correctly answer the following, you are guaranteed an interview:
Why does the following program output a 0? Explain in detail.


#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
int i = 1;
char buf[4];
strcpy(buf, "AAAA");
printf("%d\n", i);
return 0;
}

For additional information, please refer to:
http://www.fscinternet.com/namedPage...ityEngineering
markriver 当前离线  
回复时引用此帖
旧 Jan 13th, 2005, 19:59   只看该作者   #2
pengpeng
君子动口不动手
级别:3 | 在线时长:23小时 | 升级还需:9小时级别:3 | 在线时长:23小时 | 升级还需:9小时级别:3 | 在线时长:23小时 | 升级还需:9小时
 
注册日期: Jul 2004
帖子: 341
声望: 3081
pengpeng has a reputation beyond reputepengpeng has a reputation beyond reputepengpeng has a reputation beyond reputepengpeng has a reputation beyond reputepengpeng has a reputation beyond reputepengpeng has a reputation beyond reputepengpeng has a reputation beyond reputepengpeng has a reputation beyond reputepengpeng has a reputation beyond reputepengpeng has a reputation beyond reputepengpeng has a reputation beyond repute
默认

I can do that, how can I get an interview?

thx.
pengpeng 当前离线  
回复时引用此帖
旧 Jan 13th, 2005, 20:10   只看该作者   #3
sky walker
电子产品砖家
级别:18 | 在线时长:429小时 | 升级还需:8小时级别:18 | 在线时长:429小时 | 升级还需:8小时级别:18 | 在线时长:429小时 | 升级还需:8小时级别:18 | 在线时长:429小时 | 升级还需:8小时级别:18 | 在线时长:429小时 | 升级还需:8小时级别:18 | 在线时长:429小时 | 升级还需:8小时
 
sky walker 的头像
 
注册日期: Jul 2004
住址: 币稀省万苦窝
帖子: 2,172
声望: 7740066
sky walker has a reputation beyond reputesky walker has a reputation beyond reputesky walker has a reputation beyond reputesky walker has a reputation beyond reputesky walker has a reputation beyond reputesky walker has a reputation beyond reputesky walker has a reputation beyond reputesky walker has a reputation beyond reputesky walker has a reputation beyond reputesky walker has a reputation beyond reputesky walker has a reputation beyond repute
默认

buffer underflow

好好学习,天天向上
sky walker 当前离线  
回复时引用此帖
旧 Jan 13th, 2005, 21:21   只看该作者   #4
markriver
Senior Member
级别:1 | 在线时长:7小时 | 升级还需:5小时
 
注册日期: Jul 2004
帖子: 334
声望: 57
markriver will become famous soon enough
默认 我是从别的招工网站上看得

以下是全文,我觉得你把你的想法发给他们,是不是就能得到面试??你试试吧,我知道得也就这么多。发个帖子解解闷..
栈溢出应该是对的,我想他们肯定是找C和汇编的高手,起码能用softice之类的软件把跟踪过程跟他们讲清楚才行。

Security/networking engineer

Highly skilled Security/networking engineer required for challenging
position.

Mandatory skills include:


- In-depth bit-level knowledge of RFCs
- Familiarity with common security vulnerabilities and exploits
- Strong skills in protocol analysis
- Software reverse engineering
- Intel and/or Sparc assembler


Additional skills in software development/analysis also strongly
preferred.


Full-time position. Very competitive compensation with full benefits.


Reply with resume to jobs@fscinternet.com. Please include your
telephone number so that we may contact those candidates selected for
interviews.


Resumes in PDF or plain ASCII text only please.


For additional information, please refer to:
http://www.fscinternet.com/namedPage...SecurityEngine...


SAMPLE QUIZ QUESTION:


If you can correctly answer the following, you are guaranteed an
interview:


Why does the following program output a 0? Explain in detail.


#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])


{
int i = 1;
char buf[4];
strcpy(buf, "AAAA");
printf("%d\n", i);
return 0;
markriver 当前离线  
回复时引用此帖
旧 Jan 13th, 2005, 22:33   只看该作者   #5
大岭
It's hot!
级别:2 | 在线时长:14小时 | 升级还需:7小时级别:2 | 在线时长:14小时 | 升级还需:7小时
 
大岭 的头像
 
注册日期: Jul 2004
帖子: 1,802
声望: 4077
大岭 has a reputation beyond repute大岭 has a reputation beyond repute大岭 has a reputation beyond repute大岭 has a reputation beyond repute大岭 has a reputation beyond repute大岭 has a reputation beyond repute大岭 has a reputation beyond repute大岭 has a reputation beyond repute大岭 has a reputation beyond repute大岭 has a reputation beyond repute大岭 has a reputation beyond repute
默认

输出不一定是0, 可能是1.

曾经以为还有更好的。
反反复复才发觉:
其实,最好的就在我身边……
大岭 当前离线  
回复时引用此帖
旧 Jan 13th, 2005, 23:20   只看该作者   #6
hcf_15
Senior Member
级别:23 | 在线时长:624小时 | 升级还需:48小时级别:23 | 在线时长:624小时 | 升级还需:48小时级别:23 | 在线时长:624小时 | 升级还需:48小时级别:23 | 在线时长:624小时 | 升级还需:48小时级别:23 | 在线时长:624小时 | 升级还需:48小时级别:23 | 在线时长:624小时 | 升级还需:48小时级别:23 | 在线时长:624小时 | 升级还需:48小时
 
注册日期: Jul 2004
帖子: 266
声望: 83
hcf_15 will become famous soon enough
默认 Depends on what compiler that you use

You got 0, because you used MS C/C++ on Windows.
You will get 1 on Unix, I am prefer sure. Have you tried compiled by Borland? Probably it is 1 too.
hcf_15 当前离线  
回复时引用此帖
旧 Jan 15th, 2005, 20:33   只看该作者   #7
沈银河
Banned
级别:0 | 在线时长:0小时 | 升级还需:5小时
 
注册日期: Jan 2005
帖子: 29
声望: 20
沈银河 is on a distinguished road
默认

纯粹胡扯蛋

引用:
作者: markriver
闲人玩玩
If you can correctly answer the following, you are guaranteed an interview:
Why does the following program output a 0? Explain in detail.


#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
int i = 1;
char buf[4];
strcpy(buf, "AAAA");
printf("%d\n", i);
return 0;
}

For additional information, please refer to:
http://www.fscinternet.com/namedPage...ityEngineering
沈银河 当前离线  
回复时引用此帖
旧 Jan 15th, 2005, 21:45   只看该作者   #8
surfer
Junior Member
级别:2 | 在线时长:12小时 | 升级还需:9小时级别:2 | 在线时长:12小时 | 升级还需:9小时
 
注册日期: Jul 2004
帖子: 7
声望: 0
surfer is an unknown quantity at this point
默认 My understanding

1) i is pushed into stack before buf array;
2) number 1 is stored as 01 00;
3) strcpy stores '\0' to buf[4], i.e. the lower byte of i
surfer 当前离线  
回复时引用此帖
旧 Jan 16th, 2005, 00:37   只看该作者   #9
taile
Senior Member
级别:6 | 在线时长:74小时 | 升级还需:3小时级别:6 | 在线时长:74小时 | 升级还需:3小时
 
注册日期: Jan 2005
帖子: 942
声望: 4223333
taile has a reputation beyond reputetaile has a reputation beyond reputetaile has a reputation beyond reputetaile has a reputation beyond reputetaile has a reputation beyond reputetaile has a reputation beyond reputetaile has a reputation beyond reputetaile has a reputation beyond reputetaile has a reputation beyond reputetaile has a reputation beyond reputetaile has a reputation beyond repute
默认

我吐,随便一贴高人一堆堆……
taile 当前离线  
回复时引用此帖
发表新主题 回复


发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码



所有时间均为格林尼治时间 -4。现在的时间是 00:26

请尊重文章原创者,转帖请注明来源及原作者。
凡是本站用户自行发布的任何信息,皆不代表本站的立场,
华枫网站不确保各类信息的正确性和可靠性,也不承担由此而导致的任何直接或间接损失以及任何法律责任。

Copyright © 1999-2024 Chinasmile