面试题(4)

第一篇笔试题目 from http //www.edu.cn 招聘考题 一 TC2.0 环境下的如下程序, 执行结果为 please input: scanf : floating point formats not linked Abnormal program termination 试解决! #include "stdio.h" #include
摘要由CSDN通过智能技术生成

第一篇笔试题目
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 totilt 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 pillscontained 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 youcould 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 turnon 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 checksto 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 留言板re 微软招聘时的智力测试
划线
设正方形四个角的坐标分别是(0,0),(0,3),(3,0),(3,3)
第一笔 (3,0) to (0,3)
第二笔 to (0,-1)
第三笔 to (4,3)
第四笔 to (0,3)
MS 的题库好象很小嘛 就这么几道
1 1000!有几位数 为什么
解: 1000
Lg(1000!)=sum(Lg(n))
n=1
用3 段折线代替曲线 可以得到
10(0+1)/2+90(1+2)/2+900(2+3)/2=2390
作为近似结果,好象1500~3000 都算对
: 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
解:只要注意[sign(n-m)*sign(m-n)+1]在 n=m处取1 其他点取 0就可以了
: 3.编一个程序求质数的和例如F(7)=1+3+5+7+11+13+17=58
so easy,不说了
re:微软的考题(转)
微软的逆向思维
微软小球有答案了
据微软内部人士介绍,小球一题的答案为:
: 无解!
: 他要考你的逆向思维,敢不敢在考试中作出
: 正确的判断.
re 微软面试 谜语篇
1.为什么下水道的盖子是圆的
因为下水道管是圆的
2.美国有多少辆汽车汽车牌照有多少个就有多少辆
3.有一辆火车以每小时15公里的速度离开洛杉矶直奔纽约 另一辆火车以第小时20公
里的速度从纽约开往洛杉矶 如果有一只鸟 以外 30 公里每小时的速度和两辆火车现时启
动 比洛杉叽出发 碰到另辆车后返回 依次在两辆火车来回的飞行 只到两面辆火车相遇
请问 这只小鸟习行了多长距离
答案很容易计算的
假设洛杉矶到纽约的距离为 s
那小鸟飞行的距离就是
(s/(15+20))*30
4.你有两个罐子 50 个红色弹球 50 个蓝色弹球 随机选出一个罐子 随机选取出一
个弹球放入罐子 怎么给红色弹球最大的选中机会 在你的计划中 得到红球的准确几率是
多少
呵呵 我觉得概率都是 50% 没法给红色弹球最大的选中机会
7.如果你有无穷多的水 一个3 夸脱的和一个5夸脱的提桶 你如何准确称出4夸脱的

这个比较复杂
a.先用3 夸脱的桶装满倒入 5 夸脱 以下简称 3->

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值