1. 给出标准的MIN的宏定义

2. int a = 100;

char* str = (char*)malloc(sizeof(100));

问:

变量a 是放在栈中还是堆中。

字符串str指向的分配空间是放在栈中还是堆中。

3.  int ucData[100];

for(int i=0; i<100; ++i)

{

ucData[i] = i;

}

char cOut = *(char*)( (int)ucData + 1 );

cOut的值是多少?

4. 用C语言定义一个包含10个元素的数组;每一个元素都是一个有整数的参数并返回整数的函数

5. 下面的程序能否运行?如果不能,怎么改正?

void GetMemory(char* p)

{

p = (char*)malloc(sizeof(100));

}

int main(void)

{

char* str = NULL;

GetMemory(str);

strcpy(str, "hello world!");

printf("%s", str);

}

6.给出下面函数的输出:

int function1(const char* s, const char* access)

{

char* p = NULL;

char* a = NULL;

int count = 0;

for(p = s; *p != '/0'; ++p)

{

for(a = access; *a != '/0'; ++a)

if(*a == *p) break;

if *a == '/0' return count

else

++count

}

}

// 该函数的目的是找出s中连续的几个在access中的字符的长度

// 比如s为-=def, access为“=-”,返回2

char* function2(const char* s, const char* access)

{

while(*s != '/0')

{

char* a = access;        // 这段代码记得不是很真切

while(*a != '/0')

{

if(*a++ == *s++) return s;

}

++s;

}

return NULL;

}

char* function3

// --- function1,function2, function3 几个函数就是从字符串中分出由分隔符隔离开的taken

// 具体的代码,请让我想想再写。

void main(void)

{

char s[] = "-abc-=def=g"

char* str1 = NULL;

str1 = functions3(s, "-");

printf("str1=%s/n", str1);

str1 = functions3(NULL, "-=");

printf("str1=%s/n", str1);

str1 = functions3(s, "=");

printf("str1=%s/n", str1);

printf("s=%s/n", s);

}

7. 给链表按照递增的顺序排序。

struct Node{

int data;

Node* next;

}

要求不允许用临时性的数组(还有一个要求,记不清楚了,不过不影响题目)。

函数的声明如下:

Node* increase_sort_list(Node* pheader);

NSN的MGM SW engineer面试题相关推荐

  1. 微软职位内部推荐-Sr. SW Engineer for Azure Networking

    微软近期Open的职位: Senior SW Engineer The world is moving to cloud computing. Microsoft is betting Windows ...

  2. 微软职位内部推荐-Sr. SW Engineer for Privacy Id

    微软近期Open的职位: Job posting title: Senior Software Engineer for Privacy Identification Profession: Engi ...

  3. 微软职位内部推荐-SW Engineer II for Azure Network

    微软近期Open的职位: Software Engineer II The world is moving to cloud computing. Microsoft is betting Windo ...

  4. 微软职位内部推荐-SW Engineer II for WinCE

    微软近期Open的职位: Do you have a passion for embedded devices and services? &nbsp Does the following m ...

  5. 微软职位内部推荐-Senior SW Engineer for Application Ecosystem

    微软近期Open的职位: Job posting title: Senior Development Engineer Location: China, Beijing Division: Opera ...

  6. 微软职位内部推荐-SW Engineer II for Skype

    微软近期Open的职位: We are the Skype Beijing team. Skype division drives the communications strategy for Mi ...

  7. 微软职位内部推荐-SW Engineer for Skype

    微软近期Open的职位: We are the Skype Beijing team. Skype division drives the communications strategy for Mi ...

  8. c/c++笔试面试题(4)

    c/c++笔试面试题(4) 2007-11-08 16:46 749人阅读 评论(0) 收藏 举报 Sony笔试题  1.完成下列程序  *  *.*.  *..*..*..  *...*...*.. ...

  9. C/C++面试题-2 之2/2

    之2/2 45. 如何判断一个单链表是有环的?(注意不能用标志位,最多只能用两个额外指针)    struct node { char val; node* next;}    bool check( ...

最新文章

  1. hibernate正向生成数据库表以及配置——Student.java
  2. 【luogu P4005 清华集训2017】小Y和地铁
  3. 解决 pandas 读取数据时内存过大的问题
  4. 回文数的个数、杨辉三角
  5. 单片机按键软硬件设计技巧!
  6. 修改之前的myshell使之支持输入输出重定向
  7. linux man 后面的数字,Linux man命令的使用方法(以及后面数字的含义)
  8. CentOS7.X安装Redis-4.0.8以及Redis集群搭建
  9. 抖音用计算机弹曲子,抖音计算机乐谱有哪些?抖音计算机乐谱大全分享
  10. nuget.org 无法加载源 https://api.nuget.org/v3/index.json 的服务索引
  11. 可以下载MapInfo地图吗?
  12. autocad不能画图_最新AutoCAD软件+插件合集+视频讲解,高效实用,限时领
  13. vue中使用vue-baidu-map 实现点 弹窗 路线 行政区划分
  14. Shaderlab 玻璃效果
  15. Protel DXP使用教程 -建立工程与绘制原理图PCB图
  16. 武汉男人一个月要赚多少钱,老婆才不用上班?心碎成渣……
  17. popupWindow在5.0版本以下不显示的问题
  18. 用STM32和ULN2003控制28BYJ-48步进电机正反转固定角度
  19. 下一个五年,存储的生意在哪里?
  20. Linux下 Python通过ctypes调用cAPI (一)

热门文章

  1. WebMatrix开发ASP.NET试用手记[转帖]
  2. Attention Is All You Need翻译
  3. iOS开发-调用手机浏览器打开网址
  4. H5实现RTMP流的直播小记
  5. 东方财富网爬虫及可视化
  6. 超星系统登录,信息爬取
  7. java 邮箱找回密码_【JavaWeb】通过邮件找回密码
  8. wordpress获取用户数据函数:get_userdata
  9. linux 音频播放的系统层问题
  10. linux下more命令的使用