Spring Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmas50

GIAC GSSP-.NET - GIAC GIAC Secure Software Programmer - C#.NET

Page: 14 / 15
Total 491 questions

Allen works as a Software Developer for Mansoft Inc. He creates a Console application. He writes the following line of code in the application:

String str="ABC's World";

According to the given line of code, which of the following are legal statements?

Each correct answer represents a part of the solution. Choose all that apply.

A.

String st1="Hello" + str;

B.

int j=str.Length;

C.

str[2]="y";

D.

str=str+10;

E.

str=5;

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You need to write a code segment that transfers the contents of a byte array named ToSend by using a NetworkStream object named NetStr. You want to use a cache of size only 8,192 bytes. Which of the following code segments will you use to accomplish the task?

A.

MemoryStream MStream = new MemoryStream(8192); NetStr.Write(ToSend, 0, (int) MStream.Length);

B.

BufferedStream BStream = new BufferedStream(NetStr); BStream.Write(ToSend, 0, 8192);

C.

BufferedStream BStream = new BufferedStream(NetStr, 8192); BStream.Write(ToSend, 0, ToSend.Length);

D.

MemoryStream MStream = new MemoryStream(8192); MStream.Write(ToSend, 0, (int) NetStr.Length);

You work as a Web Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You are creating a Web application using .NET Framework 2.0. The application will be used in Local Area Network (LAN). The Web application reads comma enclosed text files. The text files exist in a subdirectory under the Web application's root directory. You must ensure that users never directly navigate to these files in a Web browser if they are not members of the Accounting role. You are required to write an ASP.NET HTTP handler that will use the FileAuthorizationModule class. Which of the following forms of authentications will you use?

A.

Forms

B.

Mutual

C.

Microsoft Windows Integrated Security

D.

Anonymous

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. You are developing an application using .NET Framework 2.0. You are required to use a datatype that will store only the numbers. The numbers should be in positive form and should not be larger than 65,535. Which of the following datatypes will you use to accomplish the task?

Each correct answer represents a complete solution. Choose two.

A.

int

B.

short

C.

System.UInt16

D.

ushort

E.

System.Int16

Maria works as a Software Developer for MaryLync Inc. She develops an application using Visual C# .NET, for National Stock Broker Inc. The application is used to handle sales and purchase of shares. She wants to ensure that whenever an error occurs in the code, the user is directed to an error page called error1.aspx. She writes a class named StockBroker that contains the code for real stock application. Which of the following attributes of the @ Page directive should she use to accomplish the task?

Each correct answer represents a complete solution. Choose two.

A.

Inherits

B.

Description

C.

ErrorPage

D.

Culture

You work as a Software Developer for ManSoft Inc. The company uses Visual Studio.NET 2005 as its application development platform. The company wants you to develop an application that implements a dynamic data structure for storing valuable data of different types (String, Integer, etc). You develop the application and implement the generic dynamic data structure that can be increased or decreased as and when required. You want to read the data from the data structure. Which of the following enumerators will you use to accomplish the task?

A.

LinkedList.Enumerator

B.

Stack.Enumerator

C.

Queue.Enumerator

D.

List.Enumerator

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. You create an application using .NET Framework. You use the application to create an assembly. Now you need to encrypt assembly data. The company has not provided encryption requirements to you. Which of the following symmetric cryptography classes will you use to accomplish this task?

A.

RSA

B.

3DES

C.

RijndaelManaged

D.

DES

E.

TDEA

You work as an Application Developer for ABC Inc. You are assigned with developing a Web site that will handle information related to monthly sales of the company. You wish to secure the Web site so that only employees of the Accounts department can view the Web pages. You need to create roles for the employees of this department. The user account information will be stored in a SQL Server database named Database. You decide to do all this by using the Web Site Administration Tool. Which of the following types of security will you use to accomplish the task?

A.

Basic authentication

B.

Integrated Microsoft Windows authentication

C.

Forms-based authentication

D.

Digest authentication

Sam works as a Software Developer for GenTech Inc. He develops an ASP.NET application, named App1, using Visual Studio .NET. App1 is used within the company's intranet. Employees use Internet Explorer on the intranet. Sam creates a page named Page1.aspx. Sam wants the page to be redirected to the home page if an error occurs. Which of the following attributes of the @ Page directive will he use to accomplish the task?

A.

MasterPageFile

B.

CodePage

C.

PageError

D.

ErrorPage

Hannah works as a Programmer in a college of Information Technology. The company uses Visual Studio .NET as its application development platform. The Dean of the college wants to obtain the performance report of each student. Hannah develops an application named StudentPerformanceReport by using Visual C# .NET. This application uses a SQL Server database named Database1 and a stored procedure named PROC1. PROC1 executes a query that returns the internal assessment result of each student. Hannah uses a TextBox control named AssessmentText in the application form named MyForm. She wants to display the total test result of each student in the AssessmentText text box control. StudentPerformanceReport uses a SqlCommand object to run PROC1. Hannah wants to write code to call PROC1. PROC1 contains an output parameter and displays its value as "@AssessmentResult" in text format. Which of the following code segments can Hannah use to accomplish this task?

Each correct answer represents a complete solution. Choose two.

A.

AssessmentText.Text = (string)comm.Parameters["@AssessmentResult"].Value;

B.

AssessmentText.Text = comm.Parameters["@AssessmentResult"].SourceColumn;

C.

AssessmentText.Text = comm.Parameters["@AssessmentResult"].ToString();

D.

AssessmentText.Text = comm.Parameters["@AssessmentResult"].Value.ToString();