ATTENTION : The following Microsoft 98-372 exam questions and answers were updated in recent days with the change of new Avaya Microsoft 98-372 exam, more new added questions are available at Flydumps. Please visit Flydumps and get valid Microsoft 98-372 PDF and VCE exam dumps with free new version VCE player.
Topic 1, C# QUESTION 1
Which collection enforces type safety?
A. Queue
B. Hashtable
C. ArrayList
D. List<T> Correct Answer: D
Explanation Explanation/Reference:
QUESTION 2
You need to trace the execution of an application that contains C# code and Microsoft Visual Basic .NET code.
Which tool should you use?
A. Machine Debug Manager
B. Remote Debug Monitor
C. Microsoft Visual Studio
D. CLR Profiler Correct Answer: C
Explanation Explanation/Reference:
QUESTION 3
Which core technology allows interoperability between Microsoft Visual Basic .NET code and C# code?
A. Microsoft Visual Studio
B. Windows 7
C. Microsoft Intermediate Language (MSIL)
D. Windows Azure Correct Answer: C
Explanation Explanation/Reference:
QUESTION 4
What is an advantage of strongly typed code languages like .NET?
A. Use of efficient type casting.
B. Use of less memory.
C. Capturing of errors during compilation.
D. Improved readability. Correct Answer: C
Explanation Explanation/Reference: QUESTION 5
Why do managed languages use references and not pointers?
A. Pointer notation requires more characters than reference notation.
B. Pointers are stored by using a fixed amount of memory.
C. Pointers are not type-safe.
D. Null pointers can lead to run-time errors. Correct Answer: C
Explanation Explanation/Reference:
Type-safe accesses only the memory locations it is authorized to access, and only in well- defined, allowable ways. Type-safe code cannot perform an operation on an object that is invalid for that object.
QUESTION 6
What is the name of the environment that runs .NET managed code?
A. Common Language Runtime (CLR)
B. Component Object Model (COM)
C. Virtual Private Network (VPN)
D. Microsoft Intermediate Language (MSIL) Correct Answer: A
Explanation Explanation/Reference:
QUESTION 7
You need to suspend the current thread until all Finalize() methods have been processed. Which garbage collection method should you use?
A. WaitforPendingFinalizers
B. SuppressFinalize
C. Collect
D. Dispose Correct Answer: D
Explanation Explanation/Reference:
QUESTION 8
Which feature is automatically handled in managed code but must be explicitly handled in unmanaged code?
A. Namespaces
B. Code signing
C. Memory disposal
D. Exception handling
Correct Answer: C Explanation Explanation/Reference:
Unmanaged code does not have a garbage collector and you will have to keep track of all your memory allocations to avoid memory leaks.
QUESTION 9
You want to access a native Win32 function from a .NET application.
You import the function.
Which two keywords should you use to define the function? (Each correct answer presents part of the solution. Choose two.)
A. Extern
B. Static
C. Private
D. Public
Correct Answer: AB Explanation
Explanation/Reference:
Example:
using System.Runtime.InteropServices;
using System.Windows.Interop;
using System.Diagnostics;
using System.Threading;
public partial class MainWindow : Window
{
[DllImport(“user32.dll”, SetLastError = true)]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
[DllImport(“user32.dll”, SetLastError = true)]
static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
public MainWindow()
{
InitializeComponent();
}
private void btnHost_Click(object sender, RoutedEventArgs e) {
WindowInteropHelper wndHelp = new WindowInteropHelper(this); Process.Start(“Notepad.exe”);
// Sleep the thread in order to let the Notepad start completely Thread.Sleep(50);
SetParent(FindWindow(“NotePad”, “Untitled – Notepad”), wndHelp.Handle); }
}
QUESTION 10
A class named Student is contained inside a namespace named Contoso.Registration. Another class named Student is contained inside a namespace named Contoso.Contacts.
You need to use both classes within the same code file. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. Add the following line of code on the top of the code file, Using Contoso; Refer to the classes by using the Student class wrapped within the regions named Registration and Contacts.
B. Refer to the classes by using their fully qualified class names, Contoso.Registration.Student and Contoso.Contacts.Student.
C. Add the following lines of code on the top of the code file. Using Contoso.Contacts; Using Contoso.Registration; Refer to the classes by using the Student class.
D. Add the following lines of code on the top of the code file. Using RStudent = Contoso.Registration.Student; Using CStudent = Contoso.Contacts.Student; Refer to the classes as RStudent and CStudent.
Correct Answer: AC Explanation
Explanation/Reference:
QUESTION 11
Which describes the effect of applying the protected accessibility modifier to a method?
A. The method is available to all classes derived from the declaring class.
B. The method is available only to other methods in the same class.
C. The method cannot be overridden in child classes.
D. The method is available only to classes in the same assembly.
Correct Answer: A Explanation
Explanation/Reference:
QUESTION 12
You want to create a class named ShoppingCart that has a type argument named TItem. The TItem type argument must be a value type.
Which code segment should you use to define the ShoppingCart class?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D Explanation
Explanation/Reference:
QUESTION 13
You create a class library named Contoso.Business. The library is used in a Windows application named Contoso.Ui.
In which file should you store application configuration settings during deployment?
A. Web.config
B. Machine.config
C. Contoso.Ui.config
D. Contoso.Business.config
Correct Answer: C Explanation
Explanation/Reference:
The project system stores application settings in two XML files: an app.config file, which is created at design time when you create the first application setting; and a user.config file, which is created at run time when the user who runs the application changes the value of any user setting.
QUESTION 14
Which is the base class of all classes in the .NET Framework?
A. System.Net
B. System.Drawing
C. System.Object
D. System Correct Answer: C
Explanation Explanation/Reference:
QUESTION 15
You want to raise a custom exception. Which keyword should you use?
A. Finally
B. Catch
C. Try
D. Throw Correct Answer: D
Explanation Explanation/Reference:
QUESTION 16
What is the purpose of the app.config file?
A. To configure the version of .NET targeted by the application.
B. To load references to third-party libraries used by the application.
C. To find out the programming language of the application.
D. To configure the target operating system of the application. Correct Answer: A
Explanation Explanation/Reference:
QUESTION 17
What is the characteristic of a delegate?
A. A type-safe function pointer
B. An object that raises an event
C. A tightly coupled event
D. A property function that includes optional parameters Correct Answer: A
Explanation
Explanation/Reference:
The .NET Framework defines a special type (Delegate) that provides the functionality of a function pointer.
A delegate is a class that can hold a reference to a method. Unlike other classes, a delegate class has a signature, and it can hold references only to methods that match its signature. A delegate is thus equivalent to a type-safe function pointer or a callback.
QUESTION 18
You define a method according to the following code segment. (Line numbers are included for reference only.)
Where should you insert code that must be executed, regardless of whether or not an error is thrown?
A. Between lines 05 and 06
B. Between lines 08 and 09
C. Between lines 11 and 12
D. Between lines 12 and 13 Correct Answer: C
Explanation Explanation/Reference:
QUESTION 19
You write code that reads a file from the disk.
Which exception will catch an error if the file is missing?
A. InvalidOperationException
B. FaultException
C. IOException
D. ApplicationException Correct Answer: C
Explanation Explanation/Reference:
QUESTION 20
Which file contains the required .NET settings for an ASP.NET web application?
A. Default.aspx
B. Web.config
C. Global.asax
D. Site.master Correct Answer: B
Explanation Explanation/Reference:
Our Microsoft 98-372 with Explanations presents to you the most tried and tested methods of preparation for the actual exam. The Q and A provides a very detailed preparation for your exam preparation, giving you answers to the entire exam question with the added explanation of which answer is right and why. These answers are prepared by professionals who have had years of experience and are fully competent to give you the best and the most excellent way to prepare for your actual exam.