国外嵌入式面试题

嵌入式实时操作系统VxWorks面试题及参考答案(4万字长文) 类型描述以太网控制器控制以太网硬件。WLAN驱动程序控制无线网络适配器。SLIP驱动程序通过串行线路传输IP数据包。PPP驱动程序通过点对点链路建立IP连接。USB以太网驱动控制USB以太网适配器。CAN网络驱动用于CAN网络的通信。特点描述核心最小化只保留最基本的操作系统服务。用户空间服务高级服务作为独立的进程运行。客户-服务器模型服务通过消息传递机制提供。消息传递进程间通过消息传递机制通信。可裁剪性服务可以根据需要添加或移除。安全性。 阅读详情
Embedded System Interview Questions:
  1. Can structures be passed to the functions by value?
  2. Why cannot arrays be passed by values to functions?
  3. Advantages and disadvantages of using macro and inline functions?
  4. What happens when recursion functions are declared inline?
  5. Scope of static variables?
  6. Difference between object oriented and object based languages?
  7. Multiple inheritance - objects contain howmany multiply inherited ancestor?
  8. What are the 4 different types of inheritance relationship?
  9. How would you find out the no of instance of a class?
  10. Is java a pure object oriented language? Why?
  11. Order of constructor and destructor call in case of multiple inheritance?
  12. Can u have inline virtual functions in a class?
  13. When you inherit a class using private keyword which members of base class are visible to the derived class?
  14. What is the output of printf("/nab/bcd/ref"); -> ef
  15. #define cat(x,y) x##y concatenates x to y. But cat(cat(1,2),3) does not expand but gives preprocessor warning. Why?
  16. Can you have constant volatile variable? Yes, you can have a volatile pointer?
  17. ++*ip increments what? it increments what ip points to
  18. Operations involving unsigned and signed — unsigned will be converted to signed
  19. a+++b -> (a++)+b
  20. malloc(sizeof(0)) will return — valid pointer
  21. main() {fork();fork();fork();printf("hello world"); } — will print 8 times.
  22. Array of pts to functions — void (*fptr[10])()
  23. Which way of writing infinite loops is more efficient than others? there are 3ways.
  24. # error — what it does?
  25. How is function itoa() written?
  26. Who to know wether systemuses big endian or little endian format and how to convert among them?
  27. What is interrupt latency?
  28. What is forward reference w.r.t. pointers in c?
  29. How is generic list manipulation function written which accepts elements of any kind?
  30. What is the difference between hard real-time and soft real-time OS?
  31. What is interrupt latency? How can you recuce it?
  32. What is the differnce between embedded systems and the system in which rtos is running?
  33. How can you define a structure with bit field members?
  34. What are the features different in pSOS and vxWorks?
  35. How do you write a function which takes 2 arguments - a byte and a field in the byte and returns the value of the field in that byte?
  36. What are the different storage classes in C?
  37. What are the different qualifiers in C?
  38. What are the different BSD and SVR4 communication mechanisms

  Persional Prospectives:

  1. Q1. No they are always passed by reference. Think. Size of structure can be arbitrarily large.
    Q2. Same as above.
    Q5. Lifetime of process.
    Q9. Declare a static variable, class variable, and increment(decrement) for every constructor (destructor) called.
    Q11. Constructor. Base to current. Destructor. current to base. Both are done recursuively.
    Q13. NONE
    Q14. $> acd
    ef
    ->ef is wrong, what happened to acd?
    Q16. You can have a constant pointer to a volatile variable but not a constant volatile variable.
    Q26. Write a union of int and 2 chars. Store as int retrieve as chars.
    Q 27. Time taken between INT req and INT service.
    Q33. Study Let us C, Yeshwant Kanetkar

    Tech Interviews comment by Taran

  2. Q. 13
    Answer posted is wrong.
    Public & protected members of base class will be visible to derived class, but not its objects.

    Tech Interviews comment by Sumeet

  3. Q1 - YES, a complete structure can be passed. Regarding the size, it is true that they can be very large and hence it is not a good practice to do so. In any case, one can do if one wants to.

    Tech Interviews comment by Bhaskar

  4. Q3. When using macro you can’t use data type while passing it. But in Inline function you can have data types so that it can be checked.
    e.g MACRO : ADD(a,b)
    INLINE : inline void Add(int a,int b );

    Tech Interviews comment by VijayaKumar

  5. Q1. Yes structure can be passed by value but the overhead of copying large values will be there. hence not usable. We should pass it by pointer.
    Q2. Individual element can be passed by value of course. But not whole array.
    Q5. It is alive lifetime of process, and its scope is limited to function in which it is defined.
    file1.c
    **********
    static int i;
    void main()
    {
    ……..
    }
    file2.c
    **********
    extern int i; //error

    If declared global then it is visible in that file only.
    Q6. Object oriented language have Inheritance, polymorphism etc. But object based language only deal with object.
    Q7. If
    class D:public A,B,C
    {}
    then three ancestors
    Q8. public ,private, protected, virtual
    Q30. Hard RTS is having deadline defined and it is life critical ,should be reliable. late answer is wrong answer. in Soft RTS,process time should be predictable and reliable.

    Tech Interviews comment by Pawan Kumar

  6. Q36.What are the different storage classes in C?
    A:Auto,Register,Static,Extern

    Tech Interviews comment by MKS

  7. Q5 Scope of static variables is only within the block where it is declared.
    But the lifetime is till the process is running

    Tech Interviews comment by Satish Parande

  8. Questin???

    How can we dynamically allocate memory without using malloc() or calloc() or realloc()?Explain in Breif.

    Can any one help in finding this answer to this question……

    Tech Interviews comment by Midhun V

  9. In Java, we place even the Main() function inside a CLASS.
    But it is not the case with C++.

    So, i think this is one of the answers you can say, JAVA is Fully Obejct Oriented.

    Tech Interviews comment by vsvraju

  10. Q11 : Base-class constructors are called in the order in which inheritance is specified in the derived-class definition. The order in which the Base-class constructors are specified in the derived-class member initializer list does not effect the order of construction.

    Tech Interviews comment by vsvraju

  11. Q 12:
    Yes we can have.
    you are never guaranteed that a routine is inlined. It is only a suggestion to the compiler. If
    the routine is either too complicated or a virtual function,then a static copy of the routine will be placed in the compiled module. Thus, a routine that was coded as inline may cause a performance degradation because it may consume much more space when it is not physically inlined.
    With a virtual function, a copy of that routine will be created for every module that has at least one instantiation of that class.

    Q 13:
    NONE.
    None of the Public, Protected and Private data members are visible.

    Q 16:
    YES. We can have a const volatile variable.
    a volatile variable is a variable which can be changed by the extrenal events (like an interrput timers will increment the voltile varible. If you dont want you volatile varibale to be changed then declare them as “const volatile”.

    Q 17.
    I will explain this with an example:

    int a = 10;
    int *p = &a;
    // suppose &a = 4010 (address of a)

    Because both ++ and * are unary operators, the are calculated from right to left –> ++ (*p)

    ++*p will inrement 4010 by 4 (int size) -> ++*p will have the value 4014.

    Q 21:
    It will print 8 times. Because, each fork will print twice.
    if u flush, (using “fflush”), then it will be printed only once. thats is you need to flush the iostreams.

    Q 30:

    In Hard RTOS the latency should be less the 20ns (nano sec)
    in Soft RTOS the latency range 3ns - 20ns is also acceptable.

    Tech Interviews comment by vsvraju

  12. I THINK A BALOON CAN HAVE TO MUCH ELECTRICITY

    Tech Interviews comment by SANDRA

  13. Java is not a pure object oriented language as “everything” in java is not an object. It still has primitive data types such as int, char, etc. which are NOT objects. Ruby is an example of a pure object oriented language, where “everything” is an object, even int.

    Tech Interviews comment by Karan

  14. 16. It is possible to have “const volatile” declaration. This indicates that the variable defined like this is not possible to change within that context. It can be changed by an external event. const declaraion just says that it will be readonly within the context, that area can be modified by an interrupt routine or another process.

    18. Operations involving unsigned and signed - The signed data will be converted to unsigned - Refer arithemetic conversion rules in K&R

    24. #error is used for displaying an error while compilation. for eg.

    #ifdef ABC
    printf(”ABC”);
    #else
    #ifdef DEF
    printf(DEF);
    #else
    #error “Declaration not done”
    #endif

    30. Hard RTOS is system which will be having major problems if the specified time limit is crossed. For eg. missiles
    Soft RTOS is systems which will not be having major problems if the specified limit is crossed. For eg. real time audio steaming.
    But for both exceeding the time limit is concidered as error.

    31. Interrupt latency is the time period between interrupt on the pin to the execution of 1st instuction in the interrupt routine. THis will depend upon the processor. If the execution time for the instruction is less (like in RISC) this time will also be less. If register storage is required the time will be less in the processors in which remapping of registers is present as this can be done in a single instruction.

    32. RTOS systems are embedded systems with time criticality.
    33.

    Tech Interviews comment by deepak

  15. What is interrupt latency?
    It is the time interval between an interrupt has occured till the time it has been serviced.
    Mathematically:

    Int(lat)= rt+pt+dt

    where rt=recognition time
    pt=process time
    dt=dispatch time

    Tech Interviews comment by Ramesh K.B.

  16. Q. Write a function to reverse contents in a single linked list without reversing the links?
    Can anyone pls help me out?

    Tech Interviews comment by Ramesh K.B.

  17. Q.Can we have a constant volatile variable?

    Soln: YES.We can have a const volatile variable.
    Volatile variable is one which can be changed by user,ie programmer as well as by the external events.If we declare it as const volatile,then user cannot change but can be changed by the hardware.

    Tech Interviews comment by Ramesh K.B.

  18. 20.
    malloc(sizeof(0)) will return — valid pointer
    yes. sizeof(0) –> int size and it is 4

    25.
    itoa(…)
    itoa(pointer to storage buffer,int to convert, base(eg.binary,oct,hex,dec))

    33.
    typedef struct regset{
    unsigned char onebit:1;
    unsigned char twobit:2;
    ….
    }regset;

    Tech Interviews comment by Ramesh.V

  19. i have an query regarding , interupts in Embedded systems

    can we use the interrupt function call same as ordinary function,i.e. can we pass arguments and return values from an ISR routine.

    Tech Interviews comment by Sushil Rana

  20. what happens when
    we put an infinite loop using for

    for(;;)
    what is the condition expression value by default.

    Tech Interviews comment by Sushil Rana

  21. Write a function to reverse contents in a single linked list without reversing the links?
    Can anyone pls help me out?

    Count number of nodes in the linear linked list. Let say cnt is the number of nodes and index = 0. You can swap content of index th node and cnt-index th node, each time increment index by 1. All the contents will be reversed.

    Tech Interviews comment by Hetal

  22. Scope of static variables?
    scope of static variables is limited to the local function in which it is defined and to the functions calling the stattic variable.

    Tech Interviews comment by Guneet

  23. How virtual tables are created in case of abstract classes? Is it the same as in non-abstract classes? Virtual tables r created on stack or Heap?

    Tech Interviews comment by Satish Parande

  24. why only reference is passed as a parameter in Copy constructor? why not address?

    Tech Interviews comment by Satish Parande

  25. is it possible to call delete from the class member function ?

    Tech Interviews comment by Mrinmay Biswas

  26. q.3.
    —- Inline is only a request that may be rejected also based on optimization policies,while macro is immediately replaced before compilation.
    —- type checking is not possible in Macros, but in inline its possible.

    Tech Interviews comment by Praveen 

嵌入式软件笔试面试题目大汇总_20210527.pdf 立即下载

相关推荐

vxworks问题集锦

关于Vxworks使用过程中经常出现的一些问题的收集,新手用!

vxworks面试题总结

<br />昨天去面试,面试官问了一些vxworks操作系统的问题,现总结如下,以备以后使用:<br /> <br />1. 消息队列已满,现在往消息队列写东西会怎么样?<br /> <br />    消息队列写函数msgQSend函数,有个参数,等待时间,0表示不等待,-1表示阻塞任务;消息队列满了,msgQSend会返回error, 编程者可以根据情况选择是丢失数据还是阻塞任务或者等待一段时间后丢失数据;<br />   注:在设计任务时,应该会考虑到这种情况,建议开大一些消息队列或者提高处理消息队列

zwd_125的专栏 3423

梦幻西游端游脚本开发实战:从易语言到大漠多线程全解析

本文详细解析了梦幻西游端游脚本开发的全流程,从易语言基础入门到大漠插件多线程实战。重点介绍了易语言中文编程优势、大漠插件图色识别技术,以及多线程控制台开发技巧,帮助开发者高效实现游戏自动化,提升脚本稳定性和执行效率。

weixin_29251567的博客 1059

java nvl函数_GBase 8s_NVL函数支持时间格式问题详解 PDF 下载

主要内容:1概述在很多应用场景中,经常会按日期对数据进行存储和查询,也会对日期进行一些必要的运算,如求日期的差值等,本文介绍GBase 8s中NVL函数对日期差值的支持,有一定参考价值。2问题现状2.1现状描述在某国产化替代项目中出现如下场景:NVL函数需要支持时间相减, GBase 8s中时间相减结果则是interval型,包含天-时-分-秒(示例:1 5:23:12),在这种场景下,GBase...

weixin_39630182的博客 726

无需Root!用VirtualXposed+JustTrustMe在安卓高版本上抓包拼多多API数据

本文详细介绍了在安卓高版本设备上无需Root权限即可抓取拼多多API数据的完整方案,通过VirtualXposed与JustTrustMe组合技术,有效绕过SSL Pinning限制。文章涵盖工具准备、环境配置、应用处理及实战分析,特别针对PDD应用的混合通信策略提供了专业解决方案,适合开发者进行竞品分析和数据采集。

weixin_28678151的博客 453

CA51F3系列(国产)+低功耗模式

CA51F351P6芯片是基于1T 8051内核的8位微控制器,通常情况下,运行速度比传统的8051芯片快10倍,性能更加优越。内置8K Flash程序存储器,可多次重复编程的特性给用户开发带来了极大的方便。不仅保留了传统8051芯片的基本特性,还集成了12Bit ADC、LCD/LED驱动、Touch Key、16Bit PWM、 UART、RTC、低电压检测(LVD)等功能模块。支持IDLE、STOP和低速运行三种省电模式以适应不同功耗要求的应用。

WANGJIHUIwang的博客 572

《Oracle PL/SQL开发指南》学习笔记16——Oracle PL/SQL Development Overview (Review Section,Mastery Check)

这章学的有点尴尬,基本上是看不懂啊! 本来觉得对Oracle有点熟悉了,这章告诉我并非如此。 12C New SQL Features Review Section This section has described the following points about Oracle Database 12c new SQL features: 1. Oracle Database 12c...

预见未来to50的专栏 315

详解相机的sensor工作原理

目录sensor成像原理拜尔马赛克变换(BAYER DEMOSAICING)维伦阵列摩尔纹 sensor成像原理 相机或摄像头使用数百万个微小的光腔(感光元件)来记录图像。 成像时,sensor将镜头投射来的光子储存为模拟电信号。 曝光完成后,相机关闭这些光腔(感光元件),然后通过测量模拟电信号的强度来评估每个腔中有多少光子掉入来计算数字电信号的数值。 然后模拟电信号转换为数字电信号,数字电信号的数值由位深度决定(RGB的位深度)。 最后,根据正在记录的文件格式(8位JPEG位0-255),可能会再次降低

路人coder 2万+

c语言如何删除数组中的某一个元素_这是国外某嵌入式公司的C语言面试题,很多程序员都做错了...

在C语言程序开发中,程序员可以在定义数组时对其初始化,并且允许只对一部分元素初始化,未显式给定初值的元素将被置零,例如:int a[5] = {1, 2};这行C语言代码执行完毕后,数组 a 中的元素将是 1,2,0,0,0。这是C语言数组的基本知识点。但是遗憾的是,从我昨天在圈子里分享的一个面试题来看,仍有部分C语言程序员认为未显式给定初值的数组元素值是未定义的。下面是国外某嵌入式公司的面试题,...

weixin_39970855的博客 1478

一种高超声速飞行器弹道的仿真方法

设计并实现了一个高超声速飞行器弹道仿真算法,并应用到基于OSGEarth的态势中。

eyepeak的博客 6541

滚动时域优化方法

滚动时域优化(Receding Horizon Optimization, RHO),也被广泛称为模型预测控制(Model Predictive Control, MPC),是一种用于动态系统优化和控制的。其核心思想是“在每个当前时刻k,控制器只考虑未来一个(称为“预测时域”或“优化时域”,长度N)内的系统行为。(通过测量或估计得到)。(描述状态如何随输入和干扰变化)。(如果有,可能基于历史数据或假设)。在这个有限的未来时域[k, k+N-1]上,求解一个。这个优化问题的目标是找到一个。

m0_69522810的博客 2289

嵌入式工程师国外面试题

Embedded System Interview Questions: Can structures be passed to the functions by value? 1.結構体是否能传值给函数? Why cannot arrays be passed by values to functions? 2.为什么数组不能传值给函数? Advan

这个世界乱纷纷,先把自己锻炼成器 2576

VTK:vtkAssembly用法实战

VTK:vtkAssembly用法实战程序输出程序完整源代码 程序输出 程序完整源代码 #include <vtkActor.h> #include <vtkAssembly.h> #include <vtkAxesActor.h> #include <vtkCubeSource.h> #include <vtkNamedColors.h> #include <vtkNew.h> #include <vtkOrientation

希望我的博客,能帮上你解决学习中工作中所遇到的问题 932

java 嵌入式开发面试题,[转]国外嵌入式面试题

Embedded System Interview Questions:1.Can structures be passed to the functions by value?2.Why cannot arrays be passed by values to functions?3.Advantages and disadvantages of using macro and inline f...

weixin_39582708的博客 360

【Unity】【VR】如何让Distance Grab抓取物品时限制物品的Rotation

VR中Canvas抓取旋转问题的解决方案 在VR应用中,Canvas作为UI面板常需被抓取拖动,但默认会随手柄产生Z轴旋转,导致UI歪斜。Unity的Rigidbody冻结旋转功能对此无效,因为XR抓取直接修改Transform而非物理模拟。

每日出拳老爷子的博客 611

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

国外经典的16道面向嵌入式C语言面试题的分析与解释(重新编辑版)

预处理器(Preprocessor)1. 用预处理指令#define 声明一个常数,用以表明1年中有多少秒(忽略闰年问题)#define SECONDS_PER_YEAR (60 * 60 * 24 * 365)UL 我在这想看到几件事情: 1). #define 语法的基本知识(例如:不能以分号结束,括号的使用,等等) 2). 懂得预处理器将为你计算常数表达式的值,因此,直接写出你是如何

开源开始新生活 327

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

嵌入式面试题_go to loop

//关键是要能对错误进行处理,给一个0x123490照样能得出 0x9034的值,而且,占内存要小的//要能正确转换//要能正确转换return 0;1.static变量和static 函数各有什么特点?static变量分两种,局部变量和全局变量,他们都放在全局数据区(我觉得表达不准确。全局静态变量本文件可见,局部静态变量在在定义的block内可见;static函数也放在全局数据区,外部文件不可见;3.描述一下嵌入式基于ROM的运行方式基于ram的运行方式有什么区别。

2401_87555477的博客 809

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

嵌入式面试题

 数据结构(C语言)部分常考的知识点:1、局部变量能、全局变量和静态变量2、堆和栈   3、Const、volatile、define、typedef的用途4、链表(比如链表的插入、删除和排序)5、排序(考查冒泡法的较多)6、可重入函数 、malloc函数7、指针(常考函数指针,函数指针,数组指针,指针数组和其他的应用),结构体和共用体8、#include和

唐伯虎的专栏 7594

嵌入式 c语言面试题,2016年嵌入式面试题及答案

2016年嵌入式面试题及答案嵌入式面试有什么最新问题呢?下面跟yjbys小编一起来了解吧!1.static变量和static 函数各有什么特点?static变量分两种,局部变量和全局变量,他们都放在全局数据区(我觉得表达不准确。全局静态变量本文件可见,局部静态变量在在定义的block内可见;static函数也放在全局数据区,外部文件不可见;3.描述一下嵌入式基于ROM的运行方式基于ram的运行方式...

weixin_42186015的博客 329

嵌入式_面试题

const volatile difference between union and structure Can structures be passed to the functions by value? Why cannot arrays be passed by values to functions? Advantages and disadvantages of using macro and inline functions What happens when recursion.

qq_20848757的博客 354

嵌入式面试题3(转帖)

1.static变量和static 函数各有什么特点?     static变量分两种,局部变量和全局变量,他们都放在全局数据区(我觉得表达不准确。全局静态变量本文件可见,局部静态变量在在定义的block内可见;static函数也放在全局数据区,外部文件不可见;

http://lotte-bai.github.io/ 1381

嵌入式C语言编程精华打包

嵌入式C语言编程精华打包 去发现同类优质开源项目:https://gitcode.com/ 介绍 本资源文件包含了一系列与嵌入式C语言编程相关的精华资料,旨在帮助开发者深入理解C语言在嵌入式系统中的应用,以及如何在实践中进行代码优化。以下为资源详细内容: C代码优化方案:详细介绍如何对C代码进行优化,提升程序性能和效率。 C语言嵌入式系统编程修炼之道:深入探讨嵌入式系统编程的核心技巧和方法。 C...

gitblog_06727的博客 395
上一篇: vxworks测试题及解答
下一篇: 值得回忆的本科四年学习
embeddedsoft
博客等级 码龄20年 51粉丝 39原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值