InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is multithreaded programming?(a) It’s a process in which two different processes run simultaneously(b) It’s a process in which two or more parts of same process run simultaneously(c) It’s a process in which many different process are able to access same information(d) It’s a process in which a single process can access information from many sourcesI have been asked this question in an online quiz.My question is based upon Multithreaded Programming in section Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The correct OPTION is (b) It’s a process in which two or more parts of same process RUN simultaneously |
|
| 2. |
Which of these statements is incorrect?(a) By multithreading CPU idle time is minimized, and we can take maximum use of it(b) By multitasking CPU idle time is minimized, and we can take maximum use of it(c) Two thread in Csharp can have same priority(d) A thread can exist only in two states, running and blockedI had been asked this question in my homework.The query is from Multithreaded Programming in portion Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The CORRECT choice is (d) A thread can EXIST only in two STATES, running and blocked |
|
| 3. |
Which method is used to abort thread prior to it’s normal execution?(a) sleep()(b) terminate()(c) suspend()(d) Abort()The question was posed to me by my school teacher while I was bunking the class.This interesting question is from Multithreaded Programming in section Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» RIGHT CHOICE is (d) Abort() For explanation: To TERMINATE a THREAD prior to its NORMAL conclusion, use Thread.Abort( ). Its simplest form is shown here: |
|
| 4. |
What is Semaphore?(a) Grant more than one thread access to a shared resource at the same time(b) Useful when a collection of resources is being synchronized(c) Make use of a counter to control access to a shared resource(d) All of the mentionedI had been asked this question in an international level competition.Question is taken from Multithreaded Programming topic in division Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» Correct answer is (d) All of the mentioned |
|
| 5. |
What is mutex?(a) a mutually exclusive synchronization object(b) can be acquired by more than one thread at a time(c) helps in sharing of resource which can be used by one thread(d) all of the mentionedThe question was posed to me in examination.My question comes from Multithreaded Programming topic in division Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The correct ANSWER is (a) a MUTUALLY exclusive SYNCHRONIZATION object |
|
| 6. |
What kind of exception is being thrown if Wait(), Pulse() or PulseAll() is called from code that is not within synchronized code?(a) System I/O Exception(b) DivideByZero Exception(c) SynchronizationLockException(d) All of the mentionedThis question was addressed to me in an interview for internship.Query is from Multithreaded Programming topic in portion Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» Correct ANSWER is (c) SynchronizationLockException |
|
| 7. |
Which method is called when a thread is blocked from running temporarily?(a) Pulse()(b) PulseAll()(c) Wait()(d) Both Pulse() & Wait()This question was addressed to me in exam.Enquiry is from Multithreaded Programming in portion Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» Correct option is (c) Wait() |
|
| 8. |
What is synchronization in reference to a thread?(a) It’s a process of handling situations when two or more threads need access to a shared resource(b) It’s a process by which many threads are able to access the same shared resource simultaneously(c) It’s a process by which a method is able to access many different threads simultaneously(d) It’s a method that allows too many threads to access any information they requireThe question was posed to me in unit test.Query is from Multithreaded Programming in portion Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The correct answer is (a) It’s a process of handling situations when TWO or more threads NEED access to a shared resource |
|
| 9. |
Which keyword is used for using the synchronization features defined by the Monitor class?(a) lock(b) synchronized(c) monitor(d) lockedThe question was asked during an online exam.My question is taken from Multithreaded Programming topic in division Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» Correct option is (a) LOCK |
|
| 10. |
Which of these keywords are used to implement synchronization?(a) synchronize(b) syn(c) synch(d) synchronizedI got this question in homework.My query is from Multithreaded Programming topic in section Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» CORRECT CHOICE is (d) synchronized The EXPLANATION is: NONE. |
|
| 11. |
On call of which type of method the new created thread will not start executing?(a) Begin()(b) Start()(c) New()(d) All of the mentionedThe question was posed to me by my school teacher while I was bunking the class.My enquiry is from Multithreaded Programming in section Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The CORRECT option is (b) START() |
|
| 12. |
Which of these classes is used to make a thread?(a) String(b) System(c) Thread(d) RunnableThis question was addressed to me in homework.I want to ask this question from Multithreaded Programming topic in portion Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The correct option is (C) Thread |
|
| 13. |
Choose the namespace which supports multithreading programming?(a) System.net(b) System.Linq(c) System.Threading(d) All of the mentionedI got this question during an interview.The above asked question is from Multithreaded Programming in chapter Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» CORRECT answer is (C) System.Threading Easy explanation - The classes that support MULTITHREADED programming are defined in the System.Threading namespace. Thus, you will usually INCLUDE this statement at the start of any multithreaded program. |
|
| 14. |
Number of threads that exists for each of the processes that occurs in the program:(a) at most 1(b) atleast 1(c) only 1(d) both at most 1 & atleast 1I had been asked this question during an interview.Query is from Multithreaded Programming in portion Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» Correct ANSWER is (d) both at most 1 & atleast 1 |
|
| 15. |
Select the two type of threads mentioned in the concept of multithreading:(a) foreground(b) background(c) only foreground(d) both foreground & backgroundThe question was asked in an interview for internship.My question comes from Multithreaded Programming topic in section Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» RIGHT OPTION is (d) both FOREGROUND & background Easy explanation - None. |
|
| 16. |
What is the advantage of the multithreading program?(a) Enables to utilize the idle and executing time present in most programs(b) Enables to utilize the idle time present in most programs(c) Both Enables to utilize the idle and executing time present in most programs & Enables to utilize the idle time present in most programs(d) Only Enables to utilize the idle time present in most programsI had been asked this question in an interview for job.This interesting question is from Multithreaded Programming in portion Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» Right option is (d) Only Enables to UTILIZE the idle TIME PRESENT in most programs |
|
| 17. |
Choose the statements which indicate the differences between the thread based multitasking and process based multitasking.(a) Process-based multitasking handles the concurrent execution of programs(b) Process-based multitasking handles the concurrent execution of pieces of the same program(c) Thread-based multitasking handles the concurrent execution of programs(d) Thread-based multitasking deals with the concurrent execution of pieces of the same programI have been asked this question in an interview for internship.The question is from Multithreaded Programming in division Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The correct ANSWER is (a) Process-based multitasking handles the concurrent EXECUTION of programs |
|
| 18. |
Choose the correct statement about process-based multitasking.(a) A feature that allows our computer to run two or more programs concurrently(b) A program that acts as a small unit of code that can be dispatched by the scheduler(c) Only A program that acts as a small unit of code that can be dispatched by the scheduler(d) Both A feature that allows our computer to run two or more programs concurrently & A program that acts as a small unit of code that can be dispatched by the schedulerThis question was posed to me in an online interview.The query is from Multithreaded Programming in chapter Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» Right answer is (d) Both A feature that allows our computer to run two or more programs concurrently & A program that acts as a small UNIT of code that can be dispatched by the scheduler |
|
| 19. |
Select the type of multitasking methods that exist:(a) process based(b) thread based(c) only process(d) both process & thread basedThe question was posed to me at a job interview.This is a very interesting question from Multithreaded Programming topic in chapter Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The correct ANSWER is (d) both process & THREAD based |
|
| 20. |
Which of these methods return a largest whole number less than or equal to variable X?(a) double Ciel(double X)(b) double Floor(double X)(c) double Max(double X)(d) double Min(double X)I had been asked this question in an interview for internship.My doubt is from Rounding Functions topic in division Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The correct ANSWER is (b) double Floor(double X) |
|
| 21. |
Which of these method returns a smallest whole number greater than or equal to variable X?(a) double Ciel(double X)(b) double Floor(double X)(c) double Max(double X)(d) double Min(double X)I had been asked this question in class test.The query is from Rounding Functions in portion Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» Correct answer is (a) double CIEL(double X) |
|
| 22. |
Which of these classes contains only floating point functions?(a) Math(b) Process(c) System(d) ObjectI got this question at a job interview.Question is taken from Rounding Functions topic in chapter Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The CORRECT choice is (a) MATH |
|
| 23. |
Which of these methods is a rounding function of Math class?(a) Max()(b) Min()(c) Abs()(d) Round()I got this question in unit test.This interesting question is from Rounding Functions topic in division Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» RIGHT choice is (d) Round() EXPLANATION: Round() ROUNDS up a VARIABLE to NEAREST integer. |
|
| 24. |
Which among the given classes provides types of rounding functions?(a) Math(b) Process(c) System(d) ObjectI had been asked this question by my college professor while I was bunking the class.My query is from Rounding Functions topic in chapter Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» CORRECT OPTION is (a) Math To EXPLAIN: NONE. |
|
| 25. |
Which of these classes contains only floating point functions?(a) Math(b) Process(c) System(d) ObjectI got this question in a national level competition.Origin of the question is Maths Class topic in section Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The CORRECT answer is (a) Math |
|
| 26. |
Choose the method defined by MemberInfo.(a) GetCustomAttributes()(b) IsDefined()(c) GetCustomeAttributesData()(d) All of the mentionedThis question was addressed to me in an online interview.I would like to ask this question from Introduction of Reflections topic in division Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The CORRECT option is (d) All of the mentioned |
|
| 27. |
The property signifies “Obtains a Module object that represents the module (an executable file) in which the reflected type resides”. Choose the property which specifies the following statement?(a) Type DeclaringType(b) int MetadataToken(c) Module Module(d) Type ReflectedTypeThis question was addressed to me in exam.My question is taken from Introduction of Reflections topic in chapter Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The correct OPTION is (c) MODULE Module |
|
| 28. |
Choose the class from which the namespace ‘System.Type’ is derived?(a) System.Reflection(b) System.Reflection.MemberInfo(c) Both System.Reflection & System.Reflection.MemberInfo(d) None of the mentionedI got this question in an online quiz.Question is from Introduction of Reflections topic in division Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» Correct OPTION is (b) System.Reflection.MemberInfo |
|
| 29. |
Choose the correct statement about System.Type namespace.(a) Core of the reflection subsystem as it encapsulates a type(b) Consists of many methods and properties that can be used to obtain information about a type at runtime(c) Both Core of the reflection subsystem as it encapsulates a type & Consists of many methods and properties that can be used to obtain information about a type at runtime(d) Only Consists of many methods and properties that can be used to obtain information about a type at runtimeI got this question in an international level competition.Question is taken from Introduction of Reflections topic in chapter Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» Right answer is (c) Both Core of the reflection subsystem as it encapsulates a type & Consists of MANY METHODS and properties that can be used to OBTAIN information about a type at runtime |
|
| 30. |
Choose the namespace which consists of classes that are part of .NET Reflection API?(a) System.Text(b) System.Name(c) System.Reflection(d) None of the mentionedI got this question in semester exam.This interesting question is from Introduction of Reflections topic in division Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» The correct ANSWER is (c) System.Reflection |
|
| 31. |
Which feature enables to obtain information about the use and capabilities of types at runtime?(a) Runtime type ID(b) Reflection(c) Attributes(d) None of the mentionedThis question was addressed to me in an interview for internship.Origin of the question is Introduction of Reflections in portion Reflections, Multithreaded Programming, Collection Classes and Mathematical Functions of C# |
|
Answer» Right option is (b) Reflection |
|