Category: C++ and C

Linked List

Linked List

You must be able to produce simple clean linked list implementations quickly. Implement Insert and Delete for singly-linked linked list sorted linked list circular linked list int Insert(node** head, int data) int Delete(node** head, int deleteMe) Split a linked list given a pivot value void Split(node* head, int pivot, node** lt,...

Hardware related C Questions

Hardware related C Questions

1. What are the total number of lines written in C/C++? What is the most complicated/valuable program written in C/C++? 2. What compiler was used? 3. Have you studied buses? What types? 4. Have you studied pipelining? List the 5 stages of a 5 stage pipeline. Assuming 1 clock per stage,...

Important C Interview questions

Important C Interview questions

1. How do you write a program which produces its own source code as its output? 2. How can I find the day of the week given the date? 3. Why doesn’t C have nested functions? 4. What is the most efficient way to count the number of bits which are...

C++ Interview Question Implement itoa

C++ Interview Question Implement itoa

Implementing itoa function is a popular interview question. Here’s one implementation from SAP. char *itoa(int value) { int count, /* number of characters in string */ i, /* loop control variable */ sign; /* determine if the value is negative */ char *ptr, /* temporary pointer, index into string */ *string,...