# 全球前十强，年薪15万的面试题

kary 2007-08-08 08:08:06

/* return SUCCESS */
return SUCCESS;

----------------------------------------------------------------------------------------
if (!(block_id < actblks) ¦ ¦ !(block_id >= unblocks))

-----------------------------------------------------------------------------------------
int count = 0;
while (count < total) {
count++;
return (true);
}
}

-------------------------------------------------------------------------------------------
i= 0;
while(i <= n-1)
array[i++] = 1.0;

----------------------计算n的阶乘---------------------------------------------------------------------
int factorial(int n)
{
int fac;
fac = 1;
while (n--)
fac *= n;
return fac;
}

-----------C函数，但是Java开发人员也可以做-----------------------------------------
if (i > j)
printf(“%d is greater than %d.\n”, i, j)
else
printf(“%d is smaller than %d.\n”, i, j)

-------------------------------------- C语言--------------------------------------------
#define MAX(a, b) a >b? a:b
...全文
1670 25 打赏 收藏 举报

25 条回复

kary 2007-08-18

• 打赏
• 举报

qzs19840104 2007-08-13

return SUCCESS;

----------------------------------------------------------------------------------------
if ((block_id >= actblks) && (block_id < unblocks))

------------------Java语言-----------------------------------------------------------------------
int count = 0;
while (count < total) {
count++;
return true;
}
}

----------------------初始化一个数组,数组大小为n---------------------------------------------------------------------
int i= 0;
while(i <= (n-1))
array[i++] = 1.0;

----------------------计算n的阶乘---------------------------------------------------------------------
int factorial(int n)
{
int fac;
fac = 1;
while ((n-1) > 0){
fac *= n;
n--;
}
return fac;
}

----------------------------------------------------
if (i > j)
printf(“%d is greater than %d.\n”, i , j);
else if( i < j)
printf(“%d is smaller than %d.\n”, i, j);

-------------------------------------- C语言--------------------------------------------
#define MAX(a, b) (a) >(b)? (a):(b)
• 打赏
• 举报

15W很高吗还十强呢
• 打赏
• 举报

SBtoSB 2007-08-13
15万就把你吹的？SB
• 打赏
• 举报

fish_kun 2007-08-13
if ((block_id >= actblks) || (block_id < unblocks))

• 打赏
• 举报

Cat_Of_9Life 2007-08-13
/* return SUCCESS */
return SUCCESS; 不需要注释

----------------------------------------------------------------------------------------
if (!(block_id < actblks) ¦ ¦ !(block_id >= unblocks))

-----------------------------------------------------------------------------------------
int count = 0;
while (count < total) {
count++;
return (true);
}
}

-------------------------------------------------------------------------------------------
i= 0;
while(i <= n-1)
array[i++] = 1.0;

----------------------计算n的阶乘---------------------------------------------------------------------
int factorial(int n)
{
int fac;
fac = 1;
while (n--)
fac *= n; 循环用的不好,for循环即可
return fac; 没有考虑数据溢出问题, 应 该使用数组或者字符串存储阶乘的结果
}

-----------C函数，但是Java开发人员也可以做-----------------------------------------
if (i > j)
printf(“%d is greater than %d.\n”, i, j)
else
printf(“%d is smaller than %d.\n”, i, j) //没有考虑相等

-------------------------------------- C语言--------------------------------------------
#define MAX(a, b) a >b? a:b //a,b可以为表达式,且结果外再加个括号,否则用在表
//达式可能会出错,#define MAX(a,b) ((a)>(b)?(a):(b))
• 打赏
• 举报

fish_kun 2007-08-13
return SUCCESS;

----------------------------------------------------------------------------------------
if (!(block_id < actblks) ¦ ¦ !(block_id >= unblocks))

-----------------------------------------------------------------------------------------
for ( int i = 0; i<total; i ++ )
return true;
}
}

-------------------------------------------------------------------------------------------
i= 0;
while(i < n)
array[i++] = 1.0;

----------------------计算n的阶乘---------------------------------------------------------------------
int factorial(int n)
{
int fac;
fac = 1;
while (n--)
fac *= ++fac;
return fac;
}

-----------C函数，但是Java开发人员也可以做-----------------------------------------
if (i > j)
printf(“%d is greater than %d.\n”, i, j);
else if ( i < j)
printf(“%d is smaller than %d.\n”, i, j);
else
printf(“%d is equal with %d.\n”, i, j);

-------------------------------------- C语言--------------------------------------------
#define MAX(a, b) (a) >(b)? a:b
• 打赏
• 举报

kary 2007-08-11

1）做了几年了
2）最熟悉的是什么语言和平台
3）花费了多少时间做这道题目
4）自认为技术能力怎么样（不是指根据题目）
• 打赏
• 举报

kary 2007-08-10

/* return SUCCESS */
return SUCCESS;

----------------------------------------------------------------------------------------
if (!(block_id < actblks) || !(block_id >= unblocks))

------------------Java语言-----------------------------------------------------------------------
int count = 0;
while (count < total) {
count++;
return (true);
}
}

----------------------初始化一个数组,数组大小为n---------------------------------------------------------------------
i= 0;
while(i <= n-1)
array[i++] = 1.0;

----------------------计算n的阶乘---------------------------------------------------------------------
int factorial(int n)
{
int fac;
fac = 1;
while (n-- > 0)
fac *= n;
return fac;
}

----------------------------------------------------
if (i > j)
printf(“%d is greater than %d.\n”, i, j);
else
printf(“%d is smaller than %d.\n”, i, j);

-------------------------------------- C语言--------------------------------------------
#define MAX(a, b) a >b? a:b
• 打赏
• 举报

kary 2007-08-09
mail_ricklee(NickLee):

• 打赏
• 举报

lauxp 2007-08-09
printf("%d is %s than %d", i, (i>j)? "greater":"smaller", j);
• 打赏
• 举报

siwen299 2007-08-09

• 打赏
• 举报

lauxp 2007-08-09
printf("%d is %s than %d", (i>j)? "greater":"smaller");
• 打赏
• 举报

ochinchina 2007-08-09
/* return SUCCESS */
return SUCCESS;

----------------------------------------------------------------------------------------
if (!(block_id < actblks) ¦ ¦ !(block_id >= unblocks))

if没有这种格式
-----------------------------------------------------------------------------------------
int count = 0;
while (count < total) {
count++;
return (true);
}
}

-------------------------------------------------------------------------------------------
i= 0;
while(i <= n-1)
array[i++] = 1.0;

----------------------计算n的阶乘---------------------------------------------------------------------
int factorial(int n)
{
int fac;
fac = 1;
while (n--)
fac *= n;
return fac;
}

while( n > 0 ) {
fac *= n --;
}

-----------C函数，但是Java开发人员也可以做-----------------------------------------
if (i > j)
printf(“%d is greater than %d.\n”, i, j)
else
printf(“%d is smaller than %d.\n”, i, j)

-------------------------------------- C语言--------------------------------------------
#define MAX(a, b) a >b? a:b

#define MAX(a,b) ((a) > (b))?a:b

• 打赏
• 举报

dishpzga 2007-08-09

• 打赏
• 举报

dishpzga 2007-08-09

• 打赏
• 举报

mail_ricklee 2007-08-09
kary给打个分，我的格式
• 打赏
• 举报

mail_ricklee 2007-08-09
/*
*return SUCCESS
*/
return SUCCESS;

----------------------------------------------------------------------------------------
if (
!(block_id < actblks)
&
brvbar;
&
brvbar; !(block_id >= unblocks)
)

-----------------------------------------------------------------------------------------
int count = 0;
while (count < total)
{
count++;
{
return true;
}
}

-------------------------------------------------------------------------------------------
i=0;
while(i <= (n-1))
{
i++
array[i] = 1.0;
}

----------------------计算n的阶乘---------------------------------------------------------------------
int factorial(int n)
{
int fac = 1;
while(n--)
{
fac *= n;
}
return fac;
}

-----------C函数，但是Java开发人员也可以做-----------------------------------------
if (i > j)
{
printf(“%d is greater than %d.\n”, i, j) ;
}
else
{
printf(“%d is smaller than %d.\n”, i, j) ;
}

-------------------------------------- C语言--------------------------------------------
#define MAX((a),(b)) (a)>(b)? (a):(b);
• 打赏
• 举报

justinavril 2007-08-09

• 打赏
• 举报

kaukiyou 2007-08-09

-----------C函数，但是Java开发人员也可以做---------------------------------------
if (i > j)
printf(“%d is greater than %d.\n”, i, j)
else
printf(“%d is smaller than %d.\n”, i, j)

if (i > j)
printf(“%d is greater than %d.\n”, i, j);
else
printf(“%d is smaller than %d.\n”, i, j);
-------------------------------------- C语言--------------------------------------
• 打赏
• 举报

Java SE

6.2w+

Java 2 Standard Edition

2007-08-08 08:08