[结构化面试题型]结构化面试题型 结构化面试只要考生在考前有一个充分的准备,面试成绩是可以迅速提高的。 但要想在面试中取得好成绩,就必须对结构化面试的各种题型及其解题思路有一个清晰的把...+阅读
下面是为您介绍的关于叠拓测试笔试题,请您对此进行参考:Instructions
Please answer following questions in English, you can only use less than 60 minutes for this test1. Preprocessor 10 points)
a) Please define a Macro by using preprocess instruction #define in 16-bit machine, the constant is used to indicate how many seconds in one year. (To ignore the leap year)#define SEC_PER_YEAR (365*24*60*60UL)
(Note: If you define it to be (365*24*60*60)UL, you maybe find that it does not pile well.)b) Please define a Macro, which is used to pare two parameters and return the smaller parameter.#define MIN(a, b) ((a)=(b)?(a):(b))2. What is the problem of the below code (5 points)
#include string.h
char* Func( void )
{
char p[10];
strcpy( p, 111 );
return p;
}This function can not return the string of 111.3. Data declarations (10 points)
Please define a variable according to the below requirement, for example
Requirement: An integer
Answer: int a;a) A pointer to an integer (1 point)
int *a;
b) A pointer to a pointer to an integer (1 point)
int **a;c) An array of 10 integers (1 point)
int a[10];d) An array of 10 pointers to integers (1 point)
int *a[10];e) A pointer to an array of 10 integers (2 points)
int (*a)[10];f) A pointer to a function that takes an integer as an argument and returns an integer (2 points)
int (*a)(int)
g) An array of ten pointers to functions that take an integer argument and return an integer (2 points)
int (*a[10])(int)4. Whats the output of the function and why? (6 points)
void foo(void)
{
unsigned int a = 6;
int b = -20;
(a+b 6) ? puts( 6) : puts(= 6);
}Result:6
Reason: When a variable of integer operates with a variable of unsigned integer, the integer will be automatically converted to unsigned integer, so the -20 will be converted to be a large unsigned integer.5. Const (9 points)
In the following codes, there are some const, what is meaning of each them?a) const char *pa;
The content of pa is read-only.
b) char * const pc = ca;
The address of pc is read-only.c) const char * const pd = cb;
Both the address and content of pd are read-only.6. Accessing fixed memory locations (10 points)
Please make out a few lines of C codes for accessing a fixed memory location. Requirement is to write an int variable 0xaa55 into the fixed address 0x67a9.int *p;
p = (int *)0x67a9;
*p = 0xaa55;7. Typedef (10 points)
Typedef is used to define a new structure which can replace the old structure.
You can also use preprocessor for the same things. But there must be difference between them, so please think of the below code, and answer what is the difference?
#define dPS struct s *
typedef struct s * tPS;I will declare two object variables for them, such as:
dPS test1, test2;
tPS test3, test4;You will understand whats the differences.
1. test1 is a pointer object of struct s, but test2 is not, it is object of struct s.
2. both test3 and test4 are pointer object of struct s.8. Whats the output of the code? (10 points)
1) #include iostream
using namespace std;class Base
{
public:
virtual void f(float x){ cout Base::f(float) x endl; }
void g(float x){ cout Base::g(float) x endl; }
void h(float x){ cout Base::h(float) x endl; }
};class Derived : public Base
{
public:
virtual void f(float x){ cout Derived::f(float) x endl; }
void g(int x){ cout Derived::g(int) x endl; }
void h(float x){ cout Derived::h(float) x endl; }
};void main(void)
{
Derived d;
Base *pb = d;
Derived *pd = d;
pb-f(3.14f);
pd-f(3.14f);
pb-g(3.14f);
pd-g(3.14f);
pb-h(3.14f);
pd-h(3.14f);
}Result:
Derived::f(float) 3.14
Derived::f(float) 3.14
Base::g(float) 3.14
Derived::g(int) 3.14
Base::h(float) 3.14
Derived::h(float) 3.14
延伸阅读:
2015百度校招产品经理笔试题汇总各大互联网公司的校招基本已经告一段落了,不知道各位小伙伴们都有哪些收获呢?纵观各大公司产品经理笔试题,百度的题目既有难度、又有创意。下面为大家收集了2015年百度全部地...
搜狐2015校招产品运营笔试题地点:武汉 岗位:产品经理 一、单选题 1、 dau是指什么: 2、 直播罗永浩王自如论战的网站是: 3、 Axure文件的后缀名是 二、多选题 1、 下列哪款软件不是打车软件() A、嘀嘀 B、...
组织协调类面试题突破技巧计划组织协调类面试题是直接考察考生能力的面试题型之一,其根据招考职位来设计试题,通过考生在某一特定情景下开展工作的思路来考察考生解决问题的能力,也是公务员考试中较为常...
阿里巴巴面试题一个人掉在树上阿里巴巴马云曾经出过一道经典的面试题,以下就是这道题的原题和解析,同学们,你们是怎么解答这道题的呢?和大家分享一下吧! 阿里巴巴面试题一个人掉在树上 答案一: 尽量不要动,静...
2014渣打银行性格测试笔试经验做完熬到2点钟终于把性格测试给做完啦,做之前超级担心的。很多人说渣打喜欢aggressive的人,做性格测试要把自己想象成超人,什么困难都能独当一面什么的。但是因为我本身就不是...
2015年阿里巴巴校园招聘笔试题目笔试时间为2014年8月29日,均为网上答题。第一部分为单选题,共20题,要在40分钟内完成。每个人的选择题都不一样,应该是后台有题库,每个人的试卷都是随机生成的。第二部分为附加题,...
阿里巴巴面试题java众所周知阿里巴巴是软件及互联网公司!Ja就是软件工作者必须要掌握的技术!如果有意愿加入阿里巴巴的朋友可以阅读这篇:阿里巴巴面试题ja!学习学习! 阿里巴巴面试题ja【1】 1、...
百度2015软件开发工程师笔试题百度的题总体来说不难,都是一些基础的题。好像近几年都有这样的趋势,计算机网络,操作系统,数据库,每个基础课出一道题。接着是三道程序设计题。最后是系统设计题。所以好好看计算...
面试时怎么应对性格测试求职季节,由于各行业的特性不同,对应聘者的性格要求也不同,各类测试在招聘季节让毕业生应接不暇。在求职人数多、信息不对称的情况下,性格测试因能帮助企业快速了解学生而被广泛...