81-120 Flashcards

1
Q
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

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

211

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

raise exceptions

re-throw exceptions as a different type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
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
A

reduces time to create a connection
improved scalability
improved performance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

SELECT firstName, lastName, telephoneNumber FROM Students

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

No
Yes
Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

succeeds or fails as a unit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
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
A

prevents data inconsistencies

decreases space used on disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

Yes
Yes
No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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
A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

Data Source=MyDB; UserID=username; Password=P@sswOrd; Initial Catalog=Sales

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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.

A

Place the query into a stored procedure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

cookie

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

A

computer that hosts the application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
Which programming language is characterized as client-side, dynamic and weakly typed?
A. JavaScript
B. HTML
C. ASP.NET
D. C#
A

JavaScript

17
Q

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
A

Controller

Route

18
Q
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
A

wsdl file

a proxy

19
Q
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
A

the System.Object class

20
Q
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
A

set

21
Q

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

A

Yes
Yes
No

22
Q

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

A

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
23
Q
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
A

running
stopped
paused

24
Q

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

A

LocalService

25
Q

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

A

String Array

26
Q

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
A

10

27
Q

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

A

block size

28
Q

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

A

Share and data exchange

29
Q

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

A

No
Yes
Yes

30
Q

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

A

in both the client-side code and the server-side code

31
Q
Which service can host an ASP.NET application?
A. Internet Information Services
B. Cluster Services
C. Remote Desktop Services
D. Web Services
A

Internet Information Services - Using Internet Information Services (IIS) Manager, you can create a local Web site for hosting an ASP.NET Web application.

32
Q

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

A

No change is needed

33
Q

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)

A

INSERT INTO ITEMS (Description, Completed) VALUES (‘Cheese’, 0)

34
Q
Which three are valid SQL keywords? (Choose three.)
A. GET
B. WHAT
C. FROM
D. SELECT
E. WHERE
A

FROM
SELECT
WHERE