Microsoft 70-483 Online Practice
Questions and Exam Preparation
70-483 Exam Details
Exam Code
:70-483
Exam Name
:Programming in C#
Certification
:Microsoft Certifications
Vendor
:Microsoft
Total Questions
:310 Q&As
Last Updated
:Feb 02, 2022
Microsoft 70-483 Online Questions &
Answers
Question 131:
You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object's resources until the process completes. Which garbage collector method should you use?
A. WaitForFullGCComplete() B. WaitForFullGCApproach() C. KeepAlive() D. WaitForPendingFinalizers()
C. KeepAlive()
The GC.KeepAlive method references the specified object, which makes it ineligible for garbage collection from the start of the current routine to the point where this method is called.
The purpose of the KeepAlive method is to ensure the existence of a reference to an object that is at risk of being prematurely reclaimed by the garbage collector. The KeepAlive method performs no operation and produces no side effects
other than extending the lifetime of the object passed in as a parameter.
You are developing an application that will transmit large amounts of data between a client computer and a server.
You need to ensure the validity of the data by using a cryptographic hashing algorithm.
Which algorithm should you use?
A. HMACSHA256 B. RNGCryptoServiceProvider C. DES D. Aes
A. HMACSHA256
The .NET Framework provides the following classes that implement hashing algorithms:
HMACSHA1.
MACTripleDES.
MD5CryptoServiceProvider.
RIPEMD160.
SHA1Managed.
SHA256Managed.
SHA384Managed.
SHA512Managed.
HMAC variants of all of the Secure Hash Algorithm (SHA), Message Digest 5 (MD5), and RIPEMD-160 algorithms.
CryptoServiceProvider implementations (managed code wrappers) of all the SHA algorithms.
Cryptography Next Generation (CNG) implementations of all the MD5 and SHA algorithms. Reference: http://msdn.microsoft.com/en-us/library/92f9ye3s.aspx#hash_values
Question 133:
You are creating an assembly named Assembly1 by using the Class Library project template in Microsoft Visual Studio. Assembly1 is used by a C# application named App1.
You do not have access to the Visual Studio project for App1.
You need to ensure that you can debug Assembly1.
What should you configure in the project properties?
A. On the Application page, set the Output type to Windows Application. B. On the Build page, click Allow unsafe code. C. On the Debug page, set the Start external program option for App1. D. On the Debug page, click Enable native code debugging.
C. On the Debug page, set the Start external program option for App1.
You are developing an application that will convert data into multiple output formats.
The application includes the following code. (Line numbers are included for reference only.)
You are developing a code segment that will produce tab-delimited output. All output routines implement the following interface:
You need to minimize the completion time of the GetOutput() method. Which code segment should you insert at line 06?
A. Option A B. Option B C. Option C D. Option D
B. Option B
A String object concatenation operation always creates a new object from the existing string and the new data. A StringBuilder object maintains a buffer to accommodate the concatenation of new data. New data is appended to the buffer if room is available; otherwise, a new, larger buffer is allocated, data from the original buffer is copied to the new buffer, and the new data is then appended to the new buffer. The performance of a concatenation operation for a String or StringBuilder object depends on the frequency of memory allocations. A String concatenation operation always allocates memory, whereas a StringBuilder concatenation operation allocates memory only if the StringBuilder object buffer is too small to accommodate the new data. Use the String class if you are concatenating a fixed number of String objects. In that case, the compiler may even combine individual concatenation operations into a single operation. Use a StringBuilder object if you are concatenating an arbitrary number of strings; for example, if you're using a loop to concatenate a random number of strings of user input. http:// msdn.microsoft.com/en-us/library/system.text.stringbuilder(v=vs.110).aspx
Question 135:
You have the following code (line numbers are included for reference only):
You need to ensure that if an exception occurs, the exception will be logged. Which code should you insert at line 28?
A. Option A B. Option B C. Option C D. Option D
A. Option A
* XmlWriterTraceListener
Directs tracing or debugging output as XML-encoded data to a TextWriter or to a Stream, such as a FileStream.
Question 136:
You need to write a method that retrieves data from a Microsoft Access 2013 database.
The method must meet the following requirements:
Be read-only.
Be able to use the data before the entire data set is retrieved. Minimize the amount of system overhead and the amount of memory usage.
Which type of object should you use in the method?
A. SqlDataAdapter B. DataContext C. DbDataAdapter D. OleDbDataReader
D. OleDbDataReader
OleDbDataReader Class
Provides a way of reading a forward-only stream of data rows from a data source.
Example:
OleDbConnection cn = new OleDbConnection();
OleDbCommand cmd = new OleDbCommand();
DataTable schemaTable;
OleDbDataReader myReader;
//Open a connection to the SQL Server Northwind database. cn.ConnectionString = "Provider=SQLOLEDB;Data Source=server;User ID=login; Password=password;Initial Catalog=Northwind";
Question 137:
You are creating a console application named App1.
App1 will validate user input for order entries. You are developing the following code segment (line numbers are included for reference only):
You need to complete the code segment.
The solution must ensure that prices are positive and have two decimal places.
Which code should you insert at line 03?
A. Option A B. Option B C. Option C D. Option D
C. Option C
^\d+(.\d\d)?$ only allows positive numbers.
Incorrect:
^(-)?\d+(.\d\d)?$ allows for negative numbers because of the (-) group
Question 138:
HOTSPOT
You have the following code:
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Hot Area:
Question 139:
You are creating a console application named Appl.
App1 retrieves data from the Internet by using JavaScript Object Notation (JSON).
You are developing the following code segment (line numbers are included for reference only):
You need to ensure that the code validates the JSON string. Which code should you insert at line 03?
A. Option A B. Option B C. Option C D. Option D
B. Option B
JavaScriptSerializer().Deserialize
Converts the specified JSON string to an object of type T.
Nowadays, the certification exams become more and more important and required by more and more
enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare
for the exam in a short time with less efforts? How to get a ideal result and how to find the
most reliable resources? Here on Vcedump.com, you will find all the answers.
Vcedump.com provide not only Microsoft exam questions,
answers and explanations but also complete assistance on your exam preparation and certification
application. If you are confused on your 70-483 exam preparations
and Microsoft certification application, do not hesitate to visit our
Vcedump.com to find your solutions here.