SAP4INDIA.COM

Free SAP Interview Questions and Free SAP Tutorials


Archive for the ‘C++ interview questions’ Category

C++ coding interview questions

1. . Design and implement a String class that satisfies the following: Supports embedded nulls Provide the following methods (at least) Constructor Destructor Copy constructor Assignment operator Addition operator (concatenation) Return character at location Return substring at location Find substring Provide versions of methods for String and for char* arguments 2. Given the following classes [...]

Share
No Comments

Basic C++ interview questions

1. 1.Question: Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].Answer: quicksort ((data + 222), 100); 2.Question: Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?Answer: Mergesort always [...]

Share
No Comments

C++ algorithm specific interview questions

1. Q1 What are the advantages and disadvantages of B-star trees over Binary trees? (Questioned by Motorola people) A1 B-star trees have better data structure and are quicker in search than Binary trees, but it’s harder to write codes for B-start trees. Q2 Write the psuedo code for the Depth first Search.(Questioned by Microsoft) A2 [...]

Share
No Comments

C++ networking questions

1. Q: What is the difference between Stack and Queue? A: Stack is a Last In First Out (LIFO) data structure. Queue is a First In First Out (FIFO) data structure Q: Write a fucntion that will reverse a string. (Microsoft) A: char *strrev(char *s) len = strlen(s); char *str; if ((str = (char *)malloc(len+1)) [...]

Share
No Comments

C++ algorithms interview questions from Microsoft and IB

1. (From Microsoft) Assume I have a linked list contains all of the alphabets from ‘A’ to ‘Z’. I want to find the letter ‘Q’ in the list, how does you perform the search to find the ‘Q’?Answer: In a linked list, we only know about the header and other elements are invisible unless we [...]

Share
No Comments
Rss Feeds
Powered by Yahoo! AnswersExtension Factory Builder