<dfn id="w48us"></dfn><ul id="w48us"></ul>
  • <ul id="w48us"></ul>
  • <del id="w48us"></del>
    <ul id="w48us"></ul>
  • 嵌入式面試題及答案

    時(shí)間:2024-06-25 09:08:44 嵌入式培訓(xùn) 我要投稿

    2016年嵌入式面試題及答案

      嵌入式面試有什么最新問題呢?下面跟yjbys小編一起來了解吧!

    2016年嵌入式面試題及答案

      1.static變量和static 函數(shù)各有什么特點(diǎn)?

      static變量分兩種,局部變量和全局變量,他們都放在全局?jǐn)?shù)據(jù)區(qū)(我覺得表達(dá)不準(zhǔn)確。全局靜態(tài)變量本文件可見,局部靜態(tài)變量在在定義的block內(nèi)可見;static函數(shù)也放在全局?jǐn)?shù)據(jù)區(qū),外部文件不可見;

      3.描述一下嵌入式基于ROM的運(yùn)行方式基于ram的運(yùn)行方式有什么區(qū)別。rom運(yùn)行方式是指指令從rom中取出,首先對(duì)rom有一定要求(例如按 block進(jìn)行讀寫nand flash就不支持rom運(yùn)行,同時(shí)由于rom讀寫的限制,無法完成異常處理,即異常處理函數(shù)肯定放在ram中)。在有區(qū)別就是片選不一樣。

      4.task 有幾種狀態(tài)?就緒、掛起、阻塞、睡眠、運(yùn)行

      5.task 有幾種通訊方式?共享內(nèi)存、信號(hào)量、消息隊(duì)列和管道、socket

      6.C函數(shù)允許重入嗎?函數(shù)的重入和不可重入是和函數(shù)本身有關(guān)的,例如一個(gè)字符串拷貝的函數(shù)就是可重入的,而一個(gè)在函數(shù)中調(diào)用了I/O,分配內(nèi)存是就可能是不重入的,是否重入要看調(diào)用的庫函數(shù)是否重入的.現(xiàn)在Windows平臺(tái)下的C庫已經(jīng)支持多線程了,所以如果你調(diào)用的是多線程版的C運(yùn)行庫,應(yīng)該都是可重入的.

      7.嵌入式操作系統(tǒng)和通用操作系統(tǒng)有什么差別?多優(yōu)先級(jí),搶占型,實(shí)時(shí)操作系統(tǒng)。嵌入式操作系統(tǒng)一般沒有UI,體積小,實(shí)時(shí)性強(qiáng),對(duì)穩(wěn)定性要求更高。嵌入式操作系統(tǒng)強(qiáng)調(diào)實(shí)時(shí)性,并且可裁減。要求系統(tǒng)資源的消耗要盡可能的小。

      國(guó)外嵌入式面試題:

      Embedded System Interview Questions:

      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 functions are declared inline?

      Scope of static variables?

      Difference between object oriented and object based languages?

      Multiple inheritance - objects contain howmany multiply inherited ancestor?

      What are the 4 different types of inheritance relationship?

      How would you find out the no of instance of a class?

      Is java a pure object oriented language? Why?

      Order of constructor and destructor call in case of multiple inheritance?

      Can u have inline virtual functions in a class?

      When you inherit a class using private keyword which members of base class are visible to the derived class?

      What is the output of printf("\nab\bcd\ref"); -> ef

      #define cat(x,y) x##y concatenates x to y. But cat(cat(1,2),3) does not expand but gives preprocessor warning. Why?

      Can you have constant volatile variable? Yes, you can have a volatile pointer?

      ++*ip increments what? it increments what ip points to

      Operations involving unsigned and signed — unsigned will be converted to signed

      a+++b -> (a++)+b

      malloc(sizeof(0)) will return — valid pointer

      main() {fork();fork();fork();printf("hello world"); } — will print 8 times.

      Array of pts to functions — void (*fptr[10])()

      Which way of writing infinite loops is more efficient than others? there are 3ways.

      # error — what it does?

      How is function itoa() written?

      Who to know wether systemuses big endian or little endian format and how to convert among them?

      What is interrupt latency?

      What is forward reference w.r.t. pointers in c?

      How is generic list manipulation function written which accepts elements of any kind?

      What is the difference between hard real-time and soft real-time OS?

      What is interrupt latency? How can you recuce it?

      What is the differnce between embedded systems and the system in which rtos is running?

      How can you define a structure with bit field members?

      What are the features different in pSOS and vxWorks?

      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?

      What are the different storage classes in C?

      What are the different qualifiers in C?

      What are the different BSD and SVR4 communication mechanisms

      Persional Prospectives:

      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

      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

      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

      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

      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

      Q36.What are the different storage classes in C?

      A:Auto,Register,Static,Extern

      Tech Interviews comment by MKS

      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

      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

      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

      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

      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

      I THINK A BALOON CAN HAVE TO MUCH ELECTRICITY

      Tech Interviews comment by SANDRA

      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

      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

      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.

      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.

      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.

      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

      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

      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

      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

      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

      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

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

      Tech Interviews comment by Satish Parande

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

      Tech Interviews comment by Mrinmay Biswas

      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

    【嵌入式面試題及答案】相關(guān)文章:

    嵌入式C語言面試題(附答案)06-15

    2016年嵌入式工程師面試題及答案「精選」08-19

    2017年嵌入式軟件面試題10-02

    Adobe面試題及答案01-22

    java面試題及答案11-01

    微軟面試題及答案06-07

    java面試題2017及答案06-08

    精選C++面試題及答案05-23

    linux認(rèn)證的面試題及答案12-01

    2016最新嵌入式筆試題及答案01-23

    主站蜘蛛池模板: 日韩精品久久久久久免费| 国产精品哟女在线观看| 欧美成人精品一区二区综合| 无码人妻精品一区二区三区99仓本 | 精品人妻中文字幕有码在线| 日韩精品久久久久久| 欧美黑人巨大videos精品| 久久精品国产只有精品2020| 久久亚洲精品国产精品| 国产一区二区三精品久久久无广告| 国产精品对白刺激久久久| 亚洲成人精品久久| 香港三级精品三级在线专区| 中文字幕精品亚洲无线码一区应用| 亚洲国产精品无码av| 无码国产亚洲日韩国精品视频一区二区三区 | 久久精品国产亚洲av影院| 无码人妻精品一区二区三区夜夜嗨 | 国产精品推荐天天看天天爽| 国产亚洲欧洲精品| 国产精品白浆在线观看免费| 国产精品美女久久久久AV福利| 久久精品人成免费| 亚洲精品中文字幕无码蜜桃| 伊人久久大香线蕉精品不卡| 亚洲一区二区三区在线观看精品中文| 久久夜色撩人精品国产| 久久精品国产精品亚洲下载| 伊人久久大香线蕉精品| 亚洲国产成人久久精品99 | 国产a精品视频| 国内精品久久久久影院优| 亚洲精品人成无码中文毛片 | 国产午夜亚洲精品理论片不卡| 柠檬福利精品视频导航| 国产日韩欧美精品| 国产精品久久久久久吹潮| 国产日韩欧美精品| 国产精品无码一区二区在线| 免费人欧美日韩在线精品| 日韩精品人妻av一区二区三区|