|
INTERVIEW QUESTIONS
PROGRAMMING LANGUAGES
C++
DETAILS
Question: How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array? How can you find the nodes with repetetive data in a linked list?
Answer: Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable but aac or bcd are unacceptable. Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique.
|
|
|
Category |
C++ Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 6645 users |
Added on |
7/16/2015 |
Views |
70458 |
Rate it! |
|
|
Question:
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array? How can you find the nodes with repetetive data in a linked list?
Answer:
Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable but aac or bcd are unacceptable. Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is the difference between Mutex and Binary semaphore?
|
View Answer
|
|
What methods can be overridden in Java?
|
View Answer
|
|
What is the Standard Template Library (STL)?
|
View Answer
|
|
Can you be bale to identify between Straight- through and Cross- over cable wiring? and in what case do you use Straight- through and Cross-over?
|
View Answer
|
|
How many ways are there to initialize an int with a constant?
|
View Answer
|
|
What can I safely assume about the initial values of variables which are not explicitly initialized?
|
View Answer
|
|
What is RTTI?
|
View Answer
|
|
What are the differences between a C++ struct and C++ class?
|
View Answer
|
|
How do you link a C++ program to C functions?
|
View Answer
|
|
What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator.
|
View Answer
|
|
You’re given a simple code for the class BankCustomer. Write the following functions ...
You’re given a simple code for the class BankCustomer. Write the following functions: * Copy constructor * = operator overload * == operator overload * + operator overload (customers’ balances should be added up, as an example of joint account between husband and wife)
|
View Answer
|
|
What are the defining traits of an object-oriented language?
|
View Answer
|
|
Why are arrays usually processed with for loop?
|
View Answer
|
|
Assignment Operator - What is the diffrence between a "assignment operator" and a "copy constructor"?
|
View Answer
|
|
mutable" Keyword - What is "mutable"?
|
- C++ Interview Questions & Answers">
View Answer
|
|
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
|
View Answer
|
|
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].
|
View Answer
|
|
What are 2 ways of exporting a function from a DLL?
|
View Answer
|
|
What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?
|
View Answer
|
|
Explain term POLIMORPHISM and give an example using eg. SHAPE object: If I have a base class SHAPE, how would I define DRAW methods for two objects CIRCLE and SQUARE
.
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All C++ Interview Questions & Answers - Exam Mode /
Learning Mode
|