小弟明天去智乐机试,有人知道考什么类型的题目吗?求救~~没底啊

lightdancer 2009-03-14 08:48:56
如题
...全文
332 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
sandeel 2011-06-28
  • 打赏
  • 举报
回复
为啥还要有翻译的题?
xiaona1047985204 2011-06-28
  • 打赏
  • 举报
回复
自己思考思考
凡员外 2011-06-28
  • 打赏
  • 举报
回复
考考更健康
qq84136264 2011-06-28
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 sandeel 的回复:]
为啥还要有翻译的题?
[/Quote]
貌似是文档的内容,写代码哪能不看文档呢~
Ade子夜 2011-06-27
  • 打赏
  • 举报
回复
恩!!顶
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 mailbomb 的回复:]
GameLoft面试题目

1、 求下列代码执行以后expr的值
a) int a = 8,b = 4;
int expr = a++%++b*2

b) int expr = 20 / 8 * 8;

c) int expr = 4 << 2 + 1;

d) int expr = -4321 >>>30;

e) int expr = 123 ^ 321 ^ 123;
……
[/Quote]
求答案。。。
wudafap01 2011-06-27
  • 打赏
  • 举报
回复
不错的 呵呵 你觉得是这样子就行
lightdancer 2011-06-25
  • 打赏
  • 举报
回复
额~~才看到,唉都怪我上论坛不勤快啊~~
cccloveyf 2009-03-14
  • 打赏
  • 举报
回复
不错嘛,考题考的方面很全面。
网络咖啡 2009-03-14
  • 打赏
  • 举报
回复
GameLoft面试题目

1、 求下列代码执行以后expr的值
a) int a = 8,b = 4;
int expr = a++%++b*2

b) int expr = 20 / 8 * 8;

c) int expr = 4 << 2 + 1;

d) int expr = -4321 >>>30;

e) int expr = 123 ^ 321 ^ 123;

f) int a = 255;
int expr = (byte)a + (((byte)a) & 0xff);

g) int expr = “123454321”.charAt(4) + 2;


h) Integer a = new Integer(1234);
Integer b = new Integer(1234);
boolean expr = a == b;

i) String func(String s){
return s.length() > 0 ? func(s.substring(1)) + s.charAt(0) : “”;
}
Striing expr = func(“Gameloft”);


2、 知识题
a) 什么是垃圾回收?什么时候触发垃圾回收?如何降低垃圾回收的触发频率?它能保证程序有足够的可用内存吗?


b) 请写出short的取值范围。


c) 什么是混淆(obfuscate)?有什么好处?有哪些工具可以混淆jar文件?

d) 什么是状态机?游戏开发中有那些地方能用到状态机?

e) 请根据你的知识,对以下计算机名词进行尽量简单的描述:
i. J2ME

ii. Python

iii. Ant

iv. Javac

v. Subversion

vi. OpenGL


f) 请列出你心目中一名优秀员工所应该具备的品质,并按重要程度排序



3、 分析以下程序:
const SCREEN_WIDTH = 176;
const TEXTWORD_SPACE = 3;

public static void DrawString(String strText,int posX,int posY,int flagX){
int width = GetTextWidth(strText);
int x,int y = posy;
if(flagX > 0){
x = 0;
}
else if(flagX == 0){
x = (SCREEN_WIDTH – width) / 2;
}
else{
x = SCREEN_WIDTH – width;
}
x += posX;

byte charTemp;
for(int i = 0;i <= strText.length();i++){
charTemp = strText.charAt(i);
if(charTemp < ‘!’ | charTemp > ‘z’){
x += TEXTWORD_SPACE;
continue;
}
x += DrawCharacter(charTemp,x,y);
}
}
问题:
1) 请尽量找出程序中的错误,直接标注在上面。
2) 请解释参数flagX的作用


3) 请推测函数DrawCharater的返回值有什么意义?


4、 应用题
a) 写一个函数判断两个圆是否相交,并尽量优化运行速度。
bool IsOverlapped(int x1,int y1,int r1,int x2,int y2,int r2)


b) 写一个函数去掉一个字符串中单词间多余的空格,使得相邻两个单词间有且只有一个空格。例如当输入字符串是“Hello!_ _Game_programming_ _world!”时,调用该函数后字符串变为“Hello!_Game_programming_world!”。


c) 假定屏幕的像素宽度为screenWidth,写一个函数计算一个字符串需要分成几行显示。
要求:
1、每行应尽可能多地显示字符,但不能有字符部分或完全显示在屏幕外。超过部分的字符换下一行显示。
2、每个字符的像素宽度不一样,每个字符的像素宽度不一样。用int GetCharWidth(char c)获得每个字符的像素宽度。


5、 把以下段落翻译成中文
a) An integral approach to code documentation is to write the code so that it documents itself.In other words,the code should be naturally readable in such a way as to make it easy to understand .This is accomplished by proper naming conventions and statement formatting.


b) Collections are the data structures that are most easily altered for performance-tuning purposes. Using the correct or most appropriate collection class can improve performance with little change to code. For example, if a large ordered collection has elements frequently deleted or inserted throughout it, it usually can provide better performance if based on a linked list rather than an array. On the other hand, a static(unchanging) collection that needs to be accessed by index performs better with an underlying implementation that is an array.

13,102

社区成员

发帖
与我相关
我的任务
社区描述
Java J2ME
社区管理员
  • J2ME社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧