| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 471 人关注过本帖
标题:有可能你以后面试的时候也会遇到这样的题目............
只看楼主 加入收藏
andygao818
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2006-12-19
收藏
 问题点数:0 回复次数:1 
有可能你以后面试的时候也会遇到这样的题目............

QUESTION #2

1. Write optimized C programs that will do the following:

a. Convert a base 16 number to its base 10 equivalent. Use 23DA as a test number.

b. Convert a base 8 number to its decimal equivalent. Use 7025 as a test number

c. How many integers from 1 to 1000 are not divisible by 8 or 12?

d. How many integers from 1 to 1000 are divisible by 6 or 8?

2. Explain why did you optimize your code this way.

QUESTION #3

1. Considering compacting memory while managing equal-sized blocks. Assume each block consists of a data field and a pointer field, and that we have marked every block currently in use. The blocks are currently located between memory locations a and b. We wish to relocate all active blocks so that they occupy contiguous memory starting at a. In relocating a block remember that the pointer field of any block pointing to the relocated block must be updated. Design an optimized C program for compacting the blocks.

QUESTION #4

1. Write a program in C to multiply two linear matrices. This program should take as input the dimensions of each matrix, as well as the components of each matrix. Remember to write the most optimal code possible. Use the following matrices as a test:

1 0

-2 3 0 6 1

5 4 3 8 -2

0 1

QUESTION #5

1. Assume that your CPU does not have multiply and divide units. You can not use function in C that will not use multiply, divide and modulo operators. Write the following programs:

a) multiply any given number by 7

b) divide any given number by 7

2. Make sure that you write the most optimized code, and give full description of any potential errors that can happen using your function.

搜索更多相关主题的帖子: 面试 
2007-07-03 20:04
andygao818
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2006-12-19
收藏
得分:0 

有做好的,发到我的油箱andygao818@sohu.com谢谢!!!!!!!!

2007-07-03 20:08
快速回复:有可能你以后面试的时候也会遇到这样的题目............
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011117 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved