81-120 Flashcards
struct ImageInfo { public byte[] Data; public int Lenght; public Guid Id; }
void Post() { var uploaded = PostedImage(); var newImage = new ImageInfo(); newImage.Data = uploaded; newImage.Lenght = uploaded.Lenght; newImage.Id = Guid.NewGuid(); }
The bytes that comprise the image are stored on thee stack: Y/N
The length of the image data is stored on the heap: Y/N
The Id of the image is stored on the stack: Y/N
It is No, No, Yes
Bytes[] is not a known size, so is NOT stored on the stack
Length is an int, which is a known size, so is NOT stored on the heap
Id is a Guid, which is a known size, which IS stored on the stack
The following functions are defined:
private static int Printer(int j) { for (var i = j; i > 0; i = Printer(i - 1) { Console.Write(i); } return j; }
What does the console display after the following line?
Printer(2);
A. 210
B. 211
C. 2101
D. 2121
211
The throw keyword is used to perform which two actions? (Choose two.)
A. stop processing of the code
B. move error handling to a separate thread
C. raise exceptions
D. re-throw exceptions as a different type
raise exceptions
re-throw exceptions as a different type
Which three phrases are advantages of connection pooling? (Choose three.) A. reduces time to create a connection B. requires no configuration C. reduces load on the server D. improved scalability E. improved performance
reduces time to create a connection
improved scalability
improved performance
You are creating a database for a student directory. The Students table contains the following fields:
firstName
lastName
emailAddress
telephoneNumber
Which statement will retrieve only the first name, last name, and telephone number for every student listed in the directory?
A. WHERE Students SELECT *
B. SELECT firstName, lastName, telephoneNumber FROM Students
C. SELECT firstName, lastName, telephoneNumber IN Students
D. SELECT * FROM Students
E. WHERE Students SELECT firstName, lastName, telephoneNumber
SELECT firstName, lastName, telephoneNumber FROM Students
An entity relationship diagram (ERD) is designed for an object-oriented database : Y/N
An entity relationship diagram (ERD) contains entities, relationships, and attributes: Y/N
Cardinality refers to how one table is linked to another table; as one-to-many: Y/N
No
Yes
Yes
This question requires that you evaluate the underlined text to determine if it is correct.
The benefit of using a transaction when updating multiple tables is that the update cannot fail.
Select the correct answer if the underlined text does not make the statement correct. Select “No change is needed” if the underlined text makes the statement correct.
A. No change is needed
B. succeeds or fails as a unit
C. finishes as quickly as possible
D. can be completed concurrently with other transactions
succeeds or fails as a unit
What are two advantages of normalization in a database? (Choose two) A. prevents data inconsistencies B. reduces schema limitations C. minimizes impact of data corruption D. decreases space used on disk
prevents data inconsistencies
decreases space used on disk
A queue’s items are stored in the order they were added: Y/N
A queue is a first in, first out (FIFO) data struct: Y/N
A queue has a limited number of items: Y/N
Yes
Yes
No
This question requires that you evaluate the underlined text to determine if it is correct.
Unit testing is the final set of tests that must be completed before a feature or product can be considered finished.
Select the correct answer if the underlined text does not make the statement correct. Select “No change is needed’’ if the underlined text makes the statement correct.
A. No change is needed
B. User acceptance
C. System
D. Integration
User acceptance
User acceptance testing (UAT) is the last phase of the software testing process. During UAT, actual software users test the software to make sure it can handle required tasks in real-world scenarios, according to specifications.
UAT is one of the final and critical software project procedures that must occur before newly developed software is rolled out to the market.
UAT is also known as beta testing, application testing or end user testing.
You need to create a stored procedure that passes in a person’s name and age.
Which statement should you use to create the stored procedure?
A. CREATE PROCEDURE StoreData (@UserName, @Age) B. CREATE PROCEDURE StoreData @UserName nvarchar(255), @Age int C. CREATE PROCEDURE StoreData @UserName char, @Age double D. UPDATE PROCEDURE StoreData @UserName nvarchar(255), @Age int
B
You have a SQL Server database named MyDB that uses SQL Server Authentication.
Which connection string should you use to connect to MyDB?
A. Data Source=MyDB; UserID=username; Password=P@sswOrd; Initial Catalog=Sales
B. Data Source=MyDB; Integrated Security=SSPI; Initial Catalog=Sales
C. Data Source=MyDB; Integrated Security=True; Initial Catalog=Sales
D. Data Source=MyDB; Trusted_Connection=True; MultipleActiveResultSets=True; Initial Catalog=Sales
Data Source=MyDB; UserID=username; Password=P@sswOrd; Initial Catalog=Sales
You are developing a database that other programmers will query to display race results.
You need to provide the ability to query race results without allowing access to other information in the database.
What should you do?
A. Disable implicit transactions.
B. Place the query into a stored procedure.
C. Create an index on the result table.
D. Add an AFTER UPDATE trigger on the result table to reject updates.
Place the query into a stored procedure.
This question requires that you evaluate the underlined text to determine if it is correct.
A piece of text that is 4096 bytes or smaller and is stored on and retrieved from the client computer to maintain state is known as a ViewState.
Select the correct answer if the underlined text does not make the statement correct. Select “No change is needed’’ if the underlined text makes the statement correct.
A. No change is needed
B. cookie
C. form post
D. QueryString
cookie
This question requires that you evaluate the underlined text to determine if it is correct.
Internet Information Services (IIS) must be installed on the client computers in order to run a deployed ASP.NET application.
Select the correct answer if the underlined text does not make the statement correct. Select “No change is needed” if the underlined text makes the statement correct.
A. No change is needed
B. computer that hosts the application
C. computer that you plan to deploy from
D. Application Layer Gateway Service
computer that hosts the application
Which programming language is characterized as client-side, dynamic and weakly typed? A. JavaScript B. HTML C. ASP.NET D. C#
JavaScript
The [answer] event determines which action method is needed and then calls that method :
- view
- Route
- Controller
- HTTP Handler
The URL pattern is matched during the [answer] event
- View
- Route
- Controller
- HTTP Handler
Controller
Route
When a web service is referenced from a client application in Microsoft Visual Studio, which two items are created? (Choose two.) A. a stub B. a.wsdl file C. a proxy D. a .disco file
wsdl file
a proxy
All objects in .NET inherit from which item? A. the System.Object class B. a value type C. a reference type D. the System.Type class
the System.Object class
You have a class with a property. You need to ensure that consumers of the class can write to the value of the property. Which keyword should you use? A. value B. add C. get D. set
set
You are reviewing the following class that is used to manage the results of a 5K race:
public class Player { private string _name; public const string Key = "player";
public bool MatchName(string searchTerm) { return _name.ToLower() == searchTerm; }
public void SetResult(int rank, string name) { if (_name != null) { return; } Ranking = rank; _name = name; } public int Ranking { get; private set; } }
You can only set the player’s ranking once: Y/N
If you call the MatchName method the code will throw an exception: Y/N
Yu can change Key from “player” to “racer”: Y/N
Yes
Yes
No
You are creating an application that presents the user with a Windows Form.
Which event is triggered each time the Windows Form receives focus?
A. Enter
B. Paint
C. Load
D. Activated
Enter
When you change the focus by using the mouse or by calling the Focus method, focus events of the Control class occur in the following order: Enter - GotFocus - LostFocus - Leave - Validating - Validated
What are the three basic states that a Windows service can be in? (Choose three.) A. halted B. running C. stopped D. paused E. starting
running
stopped
paused
You have a Windows Service running in the context of an account that acts as a non-privileged user on the local computer. The account presents anonymous credentials to any remote server.
What is the security context of the Windows Service?
A. LocalSystem
B. User
C. NetworkService
D. LocalService
LocalService
This question requires that you evaluate the underlined text to determine if it is correct.
Arguments are passed to console applications as a Hashtable object.
Select the correct answer if the underlined text does not make the statement correct. Select “No change is needed’’ if the underlined text makes the statement correct.
A. No change is needed
B. String Array
C. StoredProcedureCollection
D. Dictionary
String Array
You run the following code:
int a = 10;
int b = 20;
int c = 30;
int result = 0;
if (a <= b || c > a) result = 10; else if (a <= b || c <= a) result = 20; else result = 30;
What is the value of result when the code has completed? A. 0 B. 10 C. 20 D. 30
10
This question requires that you evaluate the underlined text to determine if it is correct.
To minimize the amount of storage used on the hard drive by an application that generates many small files, you should make the partition as small as possible.
Select the correct answer if the underlined text does not make the statement correct. Select “No change is needed’’ if the underlined text makes the statement correct.
A. No change is needed
B. file allocation table
C. block size
D. folder and file names
block size
You are designing a Windows Store application.
You need to design the application so that users can share content by connecting two or more devices by physically tapping the devices together.
Which user experience (UX) guideline for Windows Store applications should you use?
A. Share and data exchange
B. location-awareness
C. device-awareness
D. proximity gestures
Share and data exchange
XHTML attribute names must be in uppercase: Y/N
XHTML attribute values must be in quotation marks: Y/N
XHTML attribute minimization is forbidden: Y/N
No
Yes
Yes
You have a website that includes a form for usemame and password.
You need to ensure that users enter their username and password. The validation must work in all browsers.
Where should you put the validation control?
A. in both the client-side code and the server-side code
B. in the client-side code only
C. in the Web.config file
D. in the server-side code only
in both the client-side code and the server-side code
Which service can host an ASP.NET application? A. Internet Information Services B. Cluster Services C. Remote Desktop Services D. Web Services
Internet Information Services - Using Internet Information Services (IIS) Manager, you can create a local Web site for hosting an ASP.NET Web application.
This question requires that you evaluate the underlined text to determine if it is correct.
A table whose attributes depend only on the primary key must be at least second normal form.
Select the correct answer if the underlined text does not make the statement correct. Select “No change is needed’’ if the underlined text makes the statement correct.
A. No change is needed
B. first
C. third
D. fourth
No change is needed
You have a table named ITEMS with the following fields:
✑ ID (integer, primary key, auto generated)
✑ Description (text)
✑ Completed (Boolean)
You need to insert the following data in the table:
“Cheese”, False
Which statement should you use?
A. INSERT INTO ITEMS (ID, Description, Completed) VALUES (1, ‘Cheese’, 0)
B. INSERT INTO ITEMS (Description, Completed) VALUES (‘Cheese’, 1)
C. INSERT INTO ITEMS (10, Description, Completed) VALUES (NEWID(), ‘Cheese’, 6)
D. INSERT INTO ITEMS (Description, Completed) VALUES (‘Cheese’, 0)
INSERT INTO ITEMS (Description, Completed) VALUES (‘Cheese’, 0)
Which three are valid SQL keywords? (Choose three.) A. GET B. WHAT C. FROM D. SELECT E. WHERE
FROM
SELECT
WHERE