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.

6. How to print "n" in C?
Answer:-1. printf("\"n\"");

7. A switch statement cannot include
a) constant as arguments
b) constant expression as arguments
c) string as an argument
d) None of the above
Choose the correct option
Answer:- c) string as an argument


8. What is the output of the following code?
 #include <stdio.h>
void main() {
int s = 0;
while (s++ < 10) {
if (s < 4 && s < 9)
continue;
printf(" %d ", s);
}
}
Options
1) 1 2 3 4 5 6 7 8 9
2) 1 2 3 10
3) 4 5 6 7 8 9 10
4) 4 5 6 7 8 9
Answer:- 3) 4 5 6 7 8 9 10 -The result of the expression s++ is the value of s *before* the increment, so the expression (s++ < 10) operates on the values 0 through 9.In the body of the loop, s has been incremented, so the expression (s < 4 && s < 9) operates on the values 1 through 10. When s is between 1 and 3, the ‘continue’ statement is executed and the loop repeats from the beginning, skipping the printf. So only the values 4 through 10 are written to standard output.

9. What is the output of the following code
printf("%d", printf{"Tim"));

a. Results in a syntax error
b. Outputs Tim3
c. Outputs garbage
d. Prints Tim and terminates abruptly
Answer:- Well yes it gives out a syntax error for the above code.But if it was like this: printf("%d", printf("Tim"));Then the result will be ‘Tim3’, because printf function always returns the number of characters printed...

10. What would be the output of the following program?
main()
{
int y = 128;
const int x = y;
printf("%d", x);
}
a) 128
b) Garbage value
c) Error
d) 0
Answer:- The answer is: 128

Post a Comment

SPAMMING will not be Appreciated.

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

Hot in weekRecentComments

Hot in week

Recent

C Programming - Data Structure Interview Questions Answer

We have started series of C programming Q&A for job interview for freshers.Computer / IT Engineering Professionals and Students alike will be benefited.We recommend our user to go through pre...

C Programming Question Answer

We have started series of C programming Q&A for job interview candidates.Engineering Professionals and students alike will be benefited.We recommend our user to go through previous post to enha...

Java Objective Multiple Answer Questions Bank

We have chosen Java Oracle J2EE, J2SE, Net-beans, JVM ( Java Virtual Machine ) as our readers choice.We have created Objective Type Multiple Answer Question Collection that are frequent in job inte...

Java Question Bank Objective Q&A

Here we have collected frequently asked question in job interviews.We have chosen Java as our readers choice.You will find these helpful.We encourage our Readers to send in their suggestion. If re...

C Question Bank

We have started series of C programming Question bank for job interview candidates.Engineering Professionals and students alike will be benefited.We encourage our readers to provide feedback and as...

Comments

Anonymous:

Technology is always being the vital part of evolution either mobile phones or computer all are the part of it. Electronics have made things so easy and reliable for human being s. very few schools in...

Anonymous:

A detailed and complete knowledge guide for fresher's to crack their interviews in Embedded Programming. Looking for a job contact <a href="http:/celebratejobs.com/>celebratejobs</a&...

YouLoseBellyFat:

visual basic example codes

App Development Mumbai:

It was very useful for me. Keep sharing such ideas in the future as well. This was actually what I was looking for, and I am glad to came here! Thanks for sharing the such information with us.

Anonymous:

Thanks for Appreciations.We love to hear again from you.

Our Channel

Contact Us

Name

Email *

Message *

item