第一篇 笔试题目
from http //www.edu.cn
招聘考题 一
TC2.0 环境下的如下程序, 执行结果为
please input: scanf : floating point formats not linked
Abnormal program termination
试解决
!
#include "stdio.h"
#include "stdlib.h"
main()
{
float *a;
a = (float *)malloc(10*sizeof(float));
printf("
Please input: ");
scanf("%f", &a[0]); /* &a[0] 也不行 */
printf("
What you have input is %f
", *a);
getch();
free(a);
}
re
招聘考题一道
tc2.0 中用 scanf 输入数组的值不能使用浮点型
只要一用就会出现题目中的错误
据说这是一个没有解决的
BUG
要解决这个问题可以使用一个变量充当 中间人 传送数据
其实方法很多的
微软试题
微软 软件业的巨人 是每个的特别是年轻软件开发人的梦想之地 微软的面试是非常严格
的
录取比例大约是 60 有中选一人 相信可爱的梦想家们肯定急切的想知道怎么样才能幸
运的成为 1/60
微软面试试题可分为
1
迷语
2
算法
3
应用程序
4
智力等等
本文为迷语篇
现取部分试题内容
1.为什么下水道的盖子是圆的
2.
美国有多少辆汽车
3.你让工人为你工作七天
回报是一根金条 这个金一平分成相连的 7 段 你必须在每
天结束的时候给他们一段金条如果只许你两次把金条弄断
你如果给你的工人付费
4.有一辆火车以每小时 15 公里的速度离开洛杉矶直奔纽约
另一辆火车以第小时 20 公
里的速度从纽约开往洛杉矶
如果有一只鸟 以外 30 公里每小时的速度和两辆火车现时启
动
比洛杉叽出发 碰到另辆车后返回 依次在两辆火车来回的飞行 只到两面辆火车相遇
请问 这只小鸟习行了多长距离
5.你有两个罐子 50 个红色弹球 50 个蓝色弹球
随机选出一个罐子 随机选取出一
个弹球放入罐子
怎么给红色弹球最大的选中机会 在你的计划中 得到红球的准确几率是
多少
6.
想象你在镜子前
请问 为什么镜子中的影像可以颠倒左右 却不能颠倒上下
7.你有四人装药丸的罐子
每个药丸都有一定的重量 被污染的药丸是没被污染的重量
+1.只称量一次
如何判断哪个罐子的药被污染了
8.如果你有无穷多的水
一个 3 夸脱的和一个 5 夸脱的提桶 你如何准确称出 4 夸脱的
水
9.
你有一桶果冻
其中有黄色 绿色 红色三种 闭上眼睛选出同样颜色的两个 抓
取同种颜色的两个
抓取多少个就可以确定你肯定有两个同一颜色的果冻
10.将汽车钥匙插入车门
向哪个方向旋转就可以打开车锁
11.如果要你能去掉 50 个州的任何一个
那你去掉哪一个 为什么
Riddles
* Why is a manhole cover round?
* How many cars are there in the USA?
* You've got someone working for you for seven days and a gold bar to pay them. The gold bar is
segmented into seven connected pieces. You must give them a piece of gold at the end of every
day. If you are only allowed to make two breaks in the gold bar, how do you pay your worker?
* One train leaves Los Angeles at 15mph heading for New York. Another train leaves from New
York at 20mph heading for Los Angeles on the same track. If a bird, flying at 25mph, leaves from
Los Angeles at the same time as the train and flies back and forth between the two trains until they
collide, how far will the bird have traveled?
* You have two jars, 50 red marbles and 50 blue marbles. A jar will be picked at random, and then
a marble will be picked from the jar. Placing all of the marbles in the jars, how can you maximize
the chances of a red marble being picked? What are the exact odds of getting a red marble using
your scheme?
* Imagine you are standing in front of a mirror, facing it. Raise your left hand. Raise your right
hand. Look at your reflection. When you raise your left hand your reflection raises what appears to
be his right hand. But when you tilt your head up, your reflection does too, and does not appear to
tilt his/her head down. Why is it that the mirror appears to reverse left and right, but not up and
down?
* You have 4 jars of pills. Each pill is a certain weight, except for contaminated pills contained in
one jar, where each pill is weight + 1. How could you tell which jar had the contaminated pills in
just one measurement?
* If you had an infinite supply of water and a 5 quart and 3 quart pail, how would you measure
exactly 4 quarts?
* You have a bucket of jelly beans. Some are red, some are blue, and some green. With your eyes
closed, pick out 2 of a like color. How many do you have to grab to be sure you have 2 of the
same?
* Which way should the key turn in a car door to unlock it?
* If you could remove any of the 50 states, which state would it be and why?
数学篇
1 1000!有几位数
为什么
2
F(n)=1 n>8 n<12
F(n)=2 n<2
F(n)=3 n=6
F(n)=4 n=other
使用+ - * /和 sign(n)函数组合出 F(n)函数
sign(n)=0 n=0
sign(n)=-1 n<0
sign(n)=1 n>0
3
编一个程序求质数的和例如
F(7)=1+3+5+7+11+13+17=58
智力题
只有 5 分钟,超过 5 分钟就放弃,因为你绝对不会被微软招聘. 这是微软招聘时的智力测试!!!!
超过 5 分钟,淘汰!!!!
1
烧一根不均匀的绳需用一个小时
如何用它来判断半个小时
2
请仅用一笔画四根直线 将上图
9
各点全部连接
3 对一批编号为 1~100 全部开关朝上
开 的灯进行以下操作
凡是 1 的倍数反方向拨一次开关
2 的倍数反方向又拨一次开关 3 的倍数反方向又拨一次
开关
问 最后为关熄状态的灯的编号
Applications
* How can computer technology be integrated in an elevator system for a hundred story
office building?
* How do you optimize for availability? How would variation of traffic over a typical work
week or floor or time of day affect this?
* How would you redesign an ATM?
* Suppose we wanted to run a microwave oven from the computer. What kind of software
would you write to do this?
* How would you design a coffee-machine for an automobile.
Thinkers
* How are M&Ms made?
* If you had to learn a new computer language, how would you go about doing it?
* If MS told you we were willing to invest $5 million in a start up of your choice, what
business would you start? Why?
* If you could gather all of the computer manufacturers in the world together into one room
and then tell them one thing that they would be compelled to do, what would it be?
* Explain a scenario for testing a salt shaker.
* If you are going to receive an award in 5 years, what is it for and who is the audience?
* How would you explain how to use Microsoft Excel to your grandma?
* Why is it that when you turn on the hot water in any hotel, for example, the hot water
comes pouring out almost instantaneously?
Algorithms
* What's the difference between a linked list and an array?
* Implement an algorithm to sort a linked list. Why did you pick the method you did?
* Implement an algorithm to sort an array. Why did you pick the method you did?
* Implement strstr() (or some other string library function).
* Reverse a string. Optimize for speed. Optimize for space.
* Count the number of set bits in a number. Now optimize for speed. Now optimize for size.
* How would you find a cycle in a linked list?
* Give me an algorithm to shuffle a deck of cards, given that the cards are stored in an array
of ints.
* Write a function that takes in a string parameter and checks to see whether or not it is an
integer, and if it is then return the integer value.
* Write a function to print all of the permutations of a string.
* Implement malloc.
* Write a function to print the Fibonacci numbers.
* Write a function to copy two strings, A and B. The last few bytes of string A overlap the
first few bytes of string B.
* How would you print out the data in a binary tree, level by level, starting at the top?
部分微软试题
1 U2 合唱团在 17 分钟内得赶到演唱会场
途中必需跨过一座桥 四个人从桥的同一 端出
发
你得帮助他们到达另一端 天色很暗 而他们只有一只手电筒 一次同时最多可以有两
人一起过桥
而过桥的时候必须持有手电筒 所以就得有人把手电筒带来带去 来回桥两端
手电筒是不能用丢的方式来传递的 四个人的步行速度各不同 若两人同行则以较慢者的
速度为准
Bono 需花 1 分钟过桥 Edge 需花 2 分钟过桥 Adam 需花 5 分钟过桥 Larry 需花
10 分钟过桥 他们要如何在 17 分钟内过桥呢
(这是 Micrsoft 征聘人员时问的问题
你必须
在五分钟内答出来才可能获得聘用
2 10 个红球 10 个白球
两个相同的包 如何放置才能使任意从一包中拿一个球是红球的
可能性最高
是多少
3
三层 四层二叉树有多少种
4 1——100000 数列按一定顺序排列
有一个数字排错 如何纠错 写出最好方法 两个
数字呢
第一部分 选择题 问一些小问题 比如
XXXXX-101010
的那个
2001
年
9
月
31
日是星期几 共有 10 道
第二部分 回答题 前面是和数有关的 如 1000! 非质数的排列 有两个大题 后
面是几个简单的技术性问题
如网络中的七层协议 千年虫 数据结构等
第三部分 编程题 编程找出 ABCDEF...按字母顺序的所有组合 用递归
第四部分 英语写作 写一份
e-mail
翻译一小段中文
第五部分 写个人的一些情况 有好几道题 做过什么项目等
1:从两头烧,烧完时就是一个小时
2:米字形的画就行了
3:
素数是关
,
其余是开
作者: 风飞阳 时间: 2001-10-07 来源: Cernet 留言板
re
微软招聘时的智力测试
1:从两头烧,烧完时就是半个小时
2:
米字形的画就行了
3:素数是关,其余是开
作者: 风飞阳 时间: 2001-10-07 来源: Cernet 留言板
re
微软招聘时的智力测试
竹头
米子不是一笔
作者: lztf 时间: 2001-10-12 来源: Cernet 留言板
re
微软招聘时的智力测试
2.有延长的部分
3.no.4,9,16,25,36,47,64,81,100.
作者: holly 时间: 2001-10-13 来源: Cernet 留言板
评论0
最新资源