|
INTERVIEW QUESTIONS
MICROSOFT
DOTNET
DETAILS
Question: Given a server with 4 cpu's, and no databases write a pseudocode to search for the word camera in 100,000 html documents.
Answer: Start 4 threads which do the following task:
Opens every nth file (first thread will open 0th, 4th, 8th, 12th file, second thread will open 1st, 5th, 9th and so on) Scans the file for occurrences of word 'camera' and notes down line numbers (possibly in a hash table -- the key would be the file name with complete path and value will be an array / arraylist containing line numbers)
|
|
|
Category |
DotNet Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9656 users |
Added on |
7/28/2011 |
Views |
70332 |
Rate it! |
|
|
Question:
Given a server with 4 cpu's, and no databases write a pseudocode to search for the word camera in 100,000 html documents.
Answer:
Start 4 threads which do the following task:
Opens every nth file (first thread will open 0th, 4th, 8th, 12th file, second thread will open 1st, 5th, 9th and so on) Scans the file for occurrences of word 'camera' and notes down line numbers (possibly in a hash table -- the key would be the file name with complete path and value will be an array / arraylist containing line numbers) 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 |
|
With respect to security ,which one is the better choice ,.Net or J2EE? Explain.........
|
View Answer
|
|
What Is The Difference Between ViewState and SessionState
|
View Answer
|
|
How different are interface and abstract class in .Net?
|
View Answer
|
|
What is the difference between proc. sent BY VAL and By Ref?
|
View Answer
|
|
Which control cannot be placed in MDI?
|
View Answer
|
|
Which property of the textbox cannot be changed at runtime?
|
View Answer
|
|
What is the maximum size of the textbox?
|
View Answer
|
|
Which controls do not have events?
|
View Answer
|
|
Describe ways of cleaning up objects.
|
View Answer
|
|
What are value types and reference types?
|
View Answer
|
|
What is the Scope of public/private/friend/protected/protected friend ?
|
View Answer
|
|
What is a constructor ?
|
View Answer
|
|
What are the Parts required?
|
View Answer
|
|
RaiseEvent eventname[( argumentlist )]
|
View Answer
|
|
What is the RaiseEvent used for?
|
View Answer
|
|
What are the two kinds of properties.
|
View Answer
|
|
What is the difference between imperative and interrogative code?
|
View Answer
|
|
Explain manifest & metadata.
|
View Answer
|
|
Difference between a sub and a function.
|
View Answer
|
|
How can you clean up objects holding resources from within the code
|
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 DotNet Interview Questions & Answers - Exam Mode /
Learning Mode
|