日期:2014-05-16  浏览次数:20622 次

VIA深圳linux驱动软件工程师面试试题
1. 大端与小端的定义0x12345678在内存中的存放顺序;

2.  去掉字符串前面的空格的lib函数的实现(如:原串为 "   helloworld"输出为"helloworld")

3.  char * p = malloc(5);
     strcpy(p,"hello");
     free(p); 请问以上程序有没有问题?但是为什么其在长时间运行并没有出现问题,原因是什么?

4. char a[]={0,1,2,3};
    int *ptr = (int *)(&a+1);
    ptr --;
    printf("%d",*ptr);
    输出结果是:

5.  char *p="hello world";
     int *ptr = (int *)p;
     ptr ++;
     *ptr =0;
     printf("%d",sizeof(*p));
     输出结果是多少;

6.  16bit 的short int 数据中从高到低位依次存放RGB,R占15-11位,G占10-5位,B占4-0位,请完成六位G的函数 unsigned char getGreenData(unsignedshort color);

7
. nand flash bad block存在哪个块?slc 与mlc有什么区别?

8.i2c总线的读写流程;

9. spi有哪几种模式?各对应什么样的操作?

10. down(semphone); down_trylock(semphone) ;down_interrupttable(semphone)的异同。

11. linux poll_wait()会进入阻塞吗?如果不会,什么时间会进入?

12. linux __init 加在函数前表示什么样的含义?