Interview Questions on Embedded C

Here I post few questions, which are simple but still tricky….They may help you in giving an extra edge….You can easily find answers for all the question by googling, if not just write a comment, I will answer your query. This questions can be expected for a fresher/experienced in interviews with companies such as Qualcomm, Broadcom, securify, moschip, Global Edge, Aricents, Mirafa, Graphene, Mojo Networks, Lantronix, Adtran, Votary Softech. Be proud to be a programmer….More proud to be Embedded enggg……

  1. Which one is faster from Array & Linked list,  reasons?
  2. What is significance of Volatile key word ? a scenario where it is a must?
  3. Can you use ‘const volatile’ ?
  4. Define a macro to replace ‘sizeof’ operator, should work with struct names as input.
  5. What is ‘#pragma’ used for?
  6. Diff between ‘const char *’ and ‘char const *’ ?
  7. Diff between ‘exit’ and ‘return’ ?
  8. Diff between ‘malloc’ and ‘calloc’
  9. Diff between Bigedian and Littleedian , how will you find a system is of which edian?
  10. How can you write a code which works as edian independent ?
  11. Diff between linear data structures and non linear data structures
  12. Diff between Declaration and Definition ?
  13. Diff between stack and heap
  14. What are Opaque Pointer, dangling pointer and far pointers ?
  15. What are function pointers? What is the benefit of using them, syntax to use them.
  16. What are macros ? what is the benefit you get out of using them ? In which scenarios macros have benefit over functions ?
  17. What is ‘register’ storage class ? Can register keyword used with float variables ? what is benefit using register ?
  18. What is keyword ‘Static’ used for ? what effects it brings when used with a variable, function ?
  19. Can you change value of a local static variable defined in a fun a() using a pointer to it from other function b() ?
  20. Where are static variables stored ?
  21. How is access to static functions restricted in files other than where it is defined?
  22. What is the diff between Static and Global variables
  23. Storage classes in C, each types scope and lifetime ?
  24. What are ‘data’, ‘text’ , ‘bss’, sections for a C program ?
  25. Will total size of ‘bss’ section goes into final executable ? if not how is it available ?
  26. What is ‘read only’ data, in which section read only data sits in ?
  27. What are Unions ? In what real time usage they are used ?
  28. Diff between Structures and Unions ?
  29. What is structure padding ? Why is actually padding done ? How can you restrict padding ?
  30. Advantages and disadvantages of structure padding, in which case either help ?
  31. What are enums ? Core benefit programmer get using enums ?
  32. Can you do ‘++’ or ‘–‘ on enums ? Can we use enums in printf, scanf ?
  33. Syntax and usage of Structure definition and usage of typedef with structs ?
  34. What is ‘typedef’ used for ?
  35. Usage of ‘break’, what happens when you use it in for loop, switch, while loop ?
  36. When is keyword ‘extern’ used ? what it actually says compiler ?
  37. What is use of ‘void *’ , can we define a void variable ?
  38. What is ‘goto’, is its usage suggested or not ? if so why is it so
  39. Can ‘goto’ jump to a label which is not in the current function ?
  40. What is keyword ‘continue’ , what happens if its used out of a loop ?
  41. Which looping logic is faster from ‘while’ , ‘for’, ‘do-while’ ? reason ?
  42. What is diff between signed and unsigned variables ? how is a negative number save ?
  43. How to toggle/set/reset a bit using bitwise operators ?
  44. How are bitwise operators used in embedded programming ?
  45. How are registers configured or modified general convention in embedded ?
  46. What actually typecasting does ? usage and issues using typecasting ?
  47. What is keyword ‘const’ used for? what is the purpose, what happens when you change the value of a const variable ?
  48. What will printf and scanf functions return ?
  49. Can two cases in switch have same value ? if so what happens ?
  50. Can switch condition variable be float ?
  51. How to find no of array elements in an array ?
  52. What happens if ‘continue’ is used in Switch ?
  53. By default whats the data type of a constant without decimal pt, with decimal point ?
  54. Stages in creation of final executable for C language program ?
  55. Is adding pointers a valid operation ? if not Y?
  56. Can you assign a string to character array ?
  57. Diff btwn character array and strings ?
  58. Does name of structure represent its address ?
  59. What is a pointer and how are they usefull ?
  60. What is direct and indirect addressing ?
  61. Can we use indirect addressing on non pointer variable ?
  62. What happens when you increment and decrement a pointer ?
  63. What is a double pointer ?
  64. How is a pointer defined to a multidimensional array ?
  65. Difference between queue and linked list
  66. Usage of double linked list and single linked list ?
  67. Diff btwn Pointer to array and array pointer ?
  68. Diff between queues and stack and there major usages ?
  69. What is preprocessor ? what all operations are done in that phase ?
  70. What happens when a file included is not avaialble ?
  71. What are Compilation errors and Run time errors ?
  72. What is Static linking and Dynamic linking
  73. How to compile multiple files to create a single binary
  74. What all information is available in .ELF file ?
  75. How can you generate a .asm file in linux envi?
  76. What is diff between ‘#include “file.h”‘ and ‘#include <file.h>’
  77. Can macros be used in an array definition, as array size ?
  78. What are reentrant functions ? Can we use global variables in it ?
  79. What are recursive functions ? where are they beneficial ?
  80. How does free() work without passing size ?
  81. …..Will add up many more soon….

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s