Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Arrays Linked List Sorting Wild Pointer Job Interview Questions For Embedded C

1. What are the differences between Arrays and Linked List
Answer:-
  1. Arrays and Linked List both are list data structures used for maintaining a list of values. Arrays use sequential allocation while Linked list uses linked allocation.
  2. Linked list uses some extra memory i.e. link pointer.
  3. Indexing an element, e.g. accessing kth element is cheaper in arrays and costly in Linked list.
  4. Insertion and Deletion of elements is a cheaper operation in Linked lists.
  5. Since nodes in Linked list are dynamically allocated, it has no limitations on growth (apart from memory constraints).
  6. Merging Lists is easier in case of Linked lists.
  7. Breaking a List into two or more lists is easier in case of Linked lists. So Linked list is a better data structure in most cases. Arrays are good mostly for static data structures.
Data Declarations And qualifiers
What is Storage class
Programming Questions for Job Interview
Connections For Atmega16/32 Controllers for Serial Communication

2. What is a wild pointer?
Answer:-Wild pointer is a pointer that doesn't point to either a valid object (of the indicated type, if applicable), or to a distinguished null value, if applicable.



3. What is a BSS Data Segment?
Answer:-BSS, a part of Data Segment store all variables initialized to 0. Static variable(initialized with value other than 0) are not stored in BSS.
BSS is an "Uninitialized RAM" which is initialized to 0 before executing main().

4. When is a switch statement better than multiple if statements?
Answer:-In multiple if statements the conditions are to checked as many times the if statements are written whereas in switch condition the condition is checked only once and jumps to required block .

5. How many types of sorting are there in C?
Answer:-Basically sorting are of two types only:

A. Position Based
1. Selection sort
2. Radix sort
3. Bucket sort, etc.

B. Comparison Based
1. Bubble sort
2. Quick sort
3. Merge sort
4. Binary sort, etc.

CONTINUE READING »


This post first appeared on IngenuityDias, please read the originial post: here

Share the post

Arrays Linked List Sorting Wild Pointer Job Interview Questions For Embedded C

×

Subscribe to Ingenuitydias

Get updates delivered right to your inbox!

Thank you for your subscription

×