Software Development Fundamentals

Card Set Information

Author:
Dienekes
ID:
292569
Filename:
Software Development Fundamentals
Updated:
2015-02-21 21:33:35
Tags:
Software Development
Folders:
Software Development Fundamentals
Description:
Software Development Fundamentals
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user Dienekes on FreezingBlue Flashcards. What would you like to do?


  1. Which access modifier provides access that is not restricted?
    public

    public: Access is not restricted.

    protected: Access is limited to the containing class or types derived from the containing class.

    Internal: Access is limited to the current assembly.

    protected internal: Access is limited to the current assembly or types derived from the containing class.

    private: Access is limited to the containing type.
  2. Which access modifier restricts access to the containing class?
    private

    public: Access is not restricted.

    protected: Access is limited to the containing class or types derived from the containing class.

    Internal: Access is limited to the current assembly.

    protected internal: Access is limited to the current assembly or types derived from the containing class.

    private: Access is limited to the containing type.
  3. Which access modifier restricts access to the containing class and to any class that is derived directly or indirectly from the containing class?
    protected

    public: Access is not restricted.

    protected: Access is limited to the containing class or types derived from the containing class.

    Internal: Access is limited to the current assembly.

    protected internal: Access is limited to the current assembly or types derived from the containing class.

    private: Access is limited to the containing type.
  4. Which access modifier restricts access to the same assembly?
    internal

    public: Access is not restricted.

    protected: Access is limited to the containing class or types derived from the containing class.

    Internal: Access is limited to the current assembly.

    protected internal: Access is limited to the current assembly or types derived from the containing class.

    private: Access is limited to the containing type.
  5. Which access modifier restricts access to any code in the same assembly and only to derived classes in another assembly.
    protected internal

    public: Access is not restricted.

    protected: Access is limited to the containing class or types derived from the containing class.

    Internal: Access is limited to the current assembly.

    protected internal: Access is limited to the current assembly or types derived from the containing class.

    private: Access is limited to the containing type.
  6. An information-hiding mechanism that makes code easy to maintain and understand.
    Encapsulation

    Encapsulation, in the context of C#, refers to an object's ability to hide data and behavior that are not necessary to its user. Encapsulation enables a group of properties, methods and other members to be considered a single unit or object.

    The following are the benefits of encapsulation:

    • * Protection of data from accidental corruption
    • * Specification of the accessibility of each of the members of a class to the code outside the class
    • * Flexibility and extensibility of the code and reduction in complexity
    • * Lower coupling between objects and hence improvement in code maintainability

    Encapsulation is used to restrict access to the members of a class so as to prevent the user of a given class from manipulating objects in ways that are not intended by the designer. While encapsulation hides the internal implementation of the functionalities of class without affecting the overall functioning of the system, it allows the class to service a request for functionality and add or modify its internal structure (data or methods) to suit changing requirements.
  7. A self-contained data structures that consist of properties, methods, and events.
    Object

    In the unified type system of C#, all types, predefined and user-defined, reference types and value types, inherit directly or indirectly from Object. You can assign values of any type to variables of type object. When a variable of a value type is converted to object, it is said to be boxed.
  8. What specifies the data represented by an object?
    Properties

    A property is a member that provides a flexible mechanism to read, write, or compute the value of a private field. Properties can be used as if they are public data members, but they are actually special methods called accessors. This enables data to be accessed easily and still helps promote the safety and flexibility of methods.
  9. What specifies an object’s behavior, and events provide communication between objects?
    Methods

    A method is a code block that contains a series of statements. A program causes the statements to be executed by calling the method and specifying any required method arguments. In C#, every executed instruction is performed in the context of a method.
  10. A block of code containing a series of statements.
    Method

    A method is a code block that contains a series of statements. A program causes the statements to be executed by calling the method and specifying any required method arguments. In C#, every executed instruction is performed in the context of a method.
  11. A method’s name, its parameter list, and the order of data types of the parameters.
    Signature
  12. Used to initialize the data members of the object.
    Constructors
  13. Created from the templates defined by classes.
    Objects
  14. What is the difference between a class and an object?
    A class defines the template for an object, an object is a concrete instance of a class.
  15. ______ allow you to access class data in a safe and flexible way.
    Properties
  16. Often referred to as “smart” fields because they can include code for checking data consistency or validity.
    Properties
  17. Special types that are used to encapsulate a method with a specific signature.
    Delegates

    A delegate is a type that represents references to methods with a particular  parameter list and return type. When you instantiate a delegate, you can associate its instance with any method with a compatible signature and return type. You can invoke (or call) the method through the delegate instance.

    Delegates are used to pass methods as arguments to other methods. Event handlers are nothing more than methods that are invoked through delegates. You create a custom method, and a class such as a windows control can call your method when a certain event occurs.
  18. Used to access members from within constructors, instance methods, and accessors of instance properties.
    The this keyword.

    The this keyword refers to the current instance of the class and is also used as a modifier of the first parameter of an extension method.
  19. When you define events, you generally need what two pieces of information?
    A delegate that connects the event with its handler method(s).

    A class that contains the event data. This class is usually derived from the EventArgs class.
  20. Allows you to organize code and create unique class names.
    Namespace

    The namespace keyword is used to declare a scope that contains a set of related objects. You can use a namespace to organize code elements and to create globally unique types.
  21. A set of ordered and finite steps to solve a given problem.
    An algorithm
  22. An information-hiding mechanism that makes code easy to maintain and understand.
    Encapsulation
  23. The keyword that is used to create user-defined types that consist of small groups of related fields.
    struct

    A struct type is a value type that is typically used to encapsulate small groups of related variables, such as the coordinates of a rectangle or the characteristics of an item in an inventory.

    A data type is a value type if it holds the data within its own memory allocation. Value types include the following:

    All numeric data types Boolean, Char, and Date All structures, even if their members are reference types Enumerations, since their underlying type is always SByte, Short, Integer, Long, Byte, UShort, UInteger, or ULong

    Every structure is a value type, even if it contains reference type members. For this reason, value types such as Char and Integer are implemented by .NET Framework structures.
  24. The template from which individual objects are created.
    A class is a construct that enables you to create your own custom types by grouping together variables of other types, methods and events. A class is like a blueprint. It defines the data and behavior of a type.
  25. Properties belong to a class itself rather than individual objects.
    Static members

    A non-static class can contain static methods, fields, properties, or events. The static member is callable on a class even when no instance of the class has been created. The static member is always accessed by the class name, not the instance name. Only one copy of a static member exists, regardless of how many instances of the class are created.

    Static methods and properties cannot access non-static fields and events in their containing type, and they cannot access an instance variable of any object unless it is explicitly passed in a method parameter.

    It is more typical to declare a non-static class with some static members, than to declare an entire class as static. Two common uses of static fields are to keep a count of the number of objects that have been instantiated, or to store a value that must be shared among all instances.

    Static methods can be overloaded but not overridden, because they belong to the class, and not to any instance of the class.

    • Although a field cannot be declared as static const, a const field is essentially static in its behavior. It belongs to the type, not to instances of the type. Therefore, const fields can be accessed by
    • using the same ClassName.MemberName notation that is used for static fields. No object instance is required.

    C# does not support static local variables (variables that are declared in method scope).
  26. Data that is stored directly in memory.
    A Value type directly stores data within its memory.

    Reference types, on the other hand, store only a reference to a memory location; here, the actual data is stored at the memory location being referred to.

    Most built-in elementary data types (such as bool, int, char, double, etc.) are value types. User-defined data types created by using the keyword struct are value types as well.

    Reference types include the types created by using the keywords object, string, interface, delegate, and class.
  27. A class that inherits its functionality through inheritance
    A derived class

    Inheritance, together with encapsulation and polymorphism, is one of the three primary characteristics (or pillars) of object-oriented programming. Inheritance enables you to create new classes that reuse, extend, and modify the behavior that is defined in other classes. The class whose members are inherited is called the base class, and the class that inherits those members is called the derived class.

    • A derived class can have only one direct base class. However, inheritance is transitive. If ClassC is derived from ClassB, and ClassB is derived from ClassA, ClassC inherits the members declared in ClassB
    • and ClassA.
  28. Provide a common definition of a base class that can be shared by multiple derived classes.
    An abstract class

    The abstract modifier indicates that the thing being modified has a missing or incomplete implementation. The abstract modifier can be used with classes, methods, properties, indexers, and events. Use the abstract modifier in a class declaration to indicate that a class is intended only to be a base class of other classes. Members marked as abstract, or included in an abstract class, must be implemented by classes that derive from the abstract class.
  29. Provide complete functionality but cannot be used as base classes.
    A sealed class

    When applied to a class, the sealed modifier prevents other classes from inheriting from it. In the following example, class B inherits from class A, but no class can inherit from class B.

    You can also use the sealed modifier on a method or property that overrides a virtual method or property in a base class. This enables you to allow classes to derive from your class and prevent them from overriding specific virtual methods or properties.
  30. The ultimate base class of all the classes in the .NET Framework.
    The Object

    In the unified type system of C#, all types, predefined and user-defined, reference types and value types, inherit directly or indirectly from Object. You can assign values of any type to variables of type object. When a variable of a value type is converted to object, it is said to be boxed.
  31. The ability of derived classes to share common functionality with base classes but still define their own unique behavior.
    Polymorphism is often referred to as the third pillar of object-oriented programming, after encapsulation and inheritance.

    Polymorphism is a Greek word that means "many-shaped" and it has two distinct aspects:

    At run time, objects of a derived class may be treated as objects of a base class in places such as method parameters and collections or arrays. When this occurs, the object's declared type is no longer identical to its run-time type.

    Base classes may define and implement virtual methods, and derived classes can override them, which means they provide their own definition and implementation.

    At run-time, when client code calls the method, the CLR looks up the run-time type of the object, and invokes that override of the virtual method. Thus in your source code you can call a method on a base class, and cause a derived class's version of the method to be executed.
  32. What keyword replaces a base class member in a derived class?
    The override keyword
  33. What keyword creates a new member of the same name in the derived class and hides the base class implementation?
    The new keyword
  34. What happens if the method in the derived class is not preceded by the new keyword or the override keyword?
    The compiler will issue a warning, and the method will behave as if the new keyword were present.
  35. Used to establish contracts through which objects can interact with each other without knowing the implementation details.
    An interface contains only the signatures of methods, properties, events or indexers.

    A class or struct that implements the interface must implement the members of the interface that are specified in the interface definition.
  36. What is the set of activities that revolve around a new software product, from its inception to when the product matures and perhaps retires?
    Application lifecycle management (ALM)

    Application lifecycle management (ALM) is the product lifecycle management (governance, development, and maintenance) of application software. It encompasses requirements management, software architecture, computer programming, software testing, software maintenance, change management, continuous integration, project management, and release management.
  37. What is the process used to create plans, models, and architecture for how the software will be implemented?
    The design process
  38. What involves implementing design by creating software code, databases, and other related content?
    The software development activity
  39. The overall testing of the software system.
    System testing

    Software testing is any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results.
  40. Which repetition control statement repeatedly executes a block of statements until a specified Boolean expression evaluates to false?
    while loop
  41. Which repetition control statement repeatedly executes a block of statements until a specified Boolean expression evaluates to false, testing the condition at the bottom of the loop?
    The do-while loop
  42. Which repetition control statement combines the three elements of iteration—the initialization expression, the termination condition expression, and the counting expression—into a more readable code?
    The for loop
  43. Which repetition control statement is useful for iterating through the elements of a collection?
    The foreach loop
  44. What is a programming technique that causes a method to call itself in order to compute a result?
    Recursion
  45. This is the part that specifies the terminating condition and doesn’t call the method again.
    Base case

    The base case in the Factorial Method is "n == 0".
  46. What is the base case in the Factorial method?
    n == 0
  47. What happens if you don’t have a base case in your recursive algorithm?
    You create an infinite recursion, which will ultimately lead to a StackOverflowException.
  48. An infinite recursion will cause your computer to run out of memory and throw what type of exception?
    A System. StackOverflowException.
  49. The part that moves the algorithm toward the base case.
    Recursive case

    The recursive case in the Factorial method is the else part, where you call the method again but with a smaller value progressing toward the base case.
  50. What namespace is the StreamReader class part of?
    The System.IO namespace. 

    StreamReaders implement a TextReader that reads characters from a byte stream in a particular encoding.

    StreamReader is designed for character input in a particular encoding, whereas the Stream class is designed for byte input and output. Use StreamReader for reading lines of information from a standard text file.
  51. The four different control structures that allow programs to perform repetitive tasks in C#
    The while loop, the do-while loop, the for loop, and the foreach loop.
  52. The template from which individual objects are created.
    A class
  53. The class that sends the notification is called a ____ of the event.
    publisher
  54. The class that receives the notification is called the ____ of the event.
    subscriber
  55. ____ control where a type or type member can be used.
    Access modifiers
  56. The access modifiers where access is not restricted.

    A) protected internal
    B) protected
    C) internal
    D) private
    E) public
    E) public

    public: Access is not restricted.

    protected: Access is limited to the containing class or types derived from the containing class.

    internal: Access is limited to the current assembly.

    protected internal: Access is limited to the current assembly or types derived from the containing class.

    private : Access is limited to the containing type.
    (this multiple choice question has been scrambled)
  57. The access modifiers where access is restricted to the containing class.

    A) public
    B) internal
    C) private
    D) protected internal
    E) protected
    C) private

    public: Access is not restricted.

    protected: Access is limited to the containing class or types derived from the containing class.

    internal: Access is limited to the current assembly.

    protected internal: Access is limited to the current assembly or types derived from the containing class.

    private : Access is limited to the containing type.
    (this multiple choice question has been scrambled)
  58. The access modifiers where access is restricted to the containing class and to any class that is derived directly or indirectly from the containing class.

    A) public
    B) internal
    C) private
    D) protected internal
    E) protected
    E) protected

    public: Access is not restricted.

    protected: Access is limited to the containing class or types derived from the containing class.

    internal: Access is limited to the current assembly.

    protected internal: Access is limited to the current assembly or types derived from the containing class.

    private : Access is limited to the containing type.
    (this multiple choice question has been scrambled)
  59. The access modifiers where access is restricted to the code in the same assembly.

    A) protected
    B) public
    C) protected internal
    D) internal
    E) private
    D) internal

    public: Access is not restricted.

    protected: Access is limited to the containing class or types derived from the containing class.

    internal: Access is limited to the current assembly.

    protected internal: Access is limited to the current assembly or types derived from the containing class.

    private : Access is limited to the containing type.
    (this multiple choice question has been scrambled)
  60. The access modifiers where access is restricted to any code in the same assembly and only to derived classes in another assembly.

    A) protected internal
    B) protected
    C) internal
    D) public
    E) private
    A) protected internal

    public: Access is not restricted.

    protected: Access is limited to the containing class or types derived from the containing class.

    internal: Access is limited to the current assembly.

    protected internal: Access is limited to the current assembly or types derived from the containing class.

    private : Access is limited to the containing type.
    (this multiple choice question has been scrambled)
  61. A unit of executable code that can be independently versioned and installed.
    An assembly

    When C# code is compiled, the output executable code contained within a .dll or an .exe file is also called as an assembly. An assembly is a unit of executable code that can be independently versioned and installed.
  62. The class that inherits the functionality is called ____, and the class whose functionality is inherited is called ____.
    a derived class, a base class
  63. Do structs support inheritance?
    No, unlike classes, the structs do not support inheritance.
  64. The ____ provide a common definition of a base class that can be shared by multiple derived classes. The ____, on the other hand, provide complete functionality but cannot be used as base classes.
    abstract class, sealed class
  65. Can you create instances of an abstract class?
    No, you cannot create instances of an abstract class.
  66. What is the ultimate base class of all the classes in the .NET Framework?
    The Object class
  67. In C#, the runtime allows you to cast an object to ___.
    any of its base or derived types
  68. The ____ keyword replaces a base class member in a derived class. The ____ keyword creates a new member of the same name in the derived class and hides the base class implementation.
    override, new
  69. ____ refers to the various activities that revolve around a new software product from its inception to the time when it matures and perhaps retires.
    Application lifecycle management (ALM)
  70. ___ is the process of verifying software against its requirements.
    Software testing
  71. ___ are techniques for organizing and storing data in computer memory.
    Data structures

    How the data is stored affects how it is retrieved and manipulated. Understanding a data structure involves understanding not only the storage pattern, but also the methods used to create, access, and manipulate the structure.
  72. A(n) ____ is a collection of items of the same data type that are stored in a contiguous memory location and addressed using one or more indices.
    An array
  73. A(n) ____ is a collection of items in which the first item added to the collection is the first one to be removed.
    A queue
  74. A(n) ____ is a collection of items in which the last item added to the collection is the first one to be removed.
    A stack
  75. A(n) ____ is a collection of nodes arranged in such a way that each node contains a link to the next node in the sequence.
    A linked list
  76. Which algorithm uses a series of comparison and swap operations to arrange the elements of a list in the correct order?
    The BubbleSort

    BubbleSort works by comparing two elements to check whether they are out of order; if they are, it swaps them. The algorithm continues to do this until the entire list is in the desired order. BubbleSort gets its name from the way the algorithm works: As the algorithm progresses, the smaller items are “bubbled” up.

    When using BubbleSort, you can be assured that an array will be sorted in one less pass than the number of items. So, if there are four items (as in the example scenario), the array will be sorted (no matter what order it starts in) in three passes.
  77. Which algorithm uses partitioning and comparison operations to arrange the elements of a list in the correct order?
    The QuickSort

    The QuickSort algorithm uses the divide-and-conquer technique to continually partition a list until the size of the problem is small and hardly requires any sorting.
  78. The BubbleSort algorithm uses a series of ____ and ____ operations to arrange the elements of a list in the correct order.
    comparison and swap
  79. The QuickSort algorithm uses ____ and ____ operations to arrange the elements of a list in the correct order.
    partitioning and comparison
  80. A ____ is a document that is served over the World Wide Web (WWW) and can be displayed by a Web browser.
    Web page
  81. ____ is the language used by Web servers and browsers to describe a Web page.
    Hypertext Markup Language (HTML)
  82. ____ enable you to store style and formatting information separate from HTML code.
    Cascading style sheets (CSS)

    This separation makes it easy to update a Web site. Visual Studio includes tools to build and preview your style sheets.
  83. ____ is a client-side scripting language that runs inside a Web browser to help create far more interactive Web pages than are possible with only HTML.
    JavaScript
  84. What techniques, such as query strings, cookies, hidden fields, and ViewState, use HTML and the capabilities of Web browsers to store state information on client computers?
    Client-side state management
  85. Client-side state management techniques, such as ____, ____, ____, and ____, use HTML and the capabilities of Web browsers to store state information on client computers?
    query strings, cookies, hidden fields, and ViewState
  86. ____ state management techniques such as session state and application state use server resources for state management.
    Server-side
  87. Server-side state management techniques such as ____ and ____ use server resources for state management.
    Session state and application state
  88. ____ is a Web server for hosting Web applications on the Windows operating system.
    Internet Information Services (IIS)

    An IIS server uses the concepts of sites, applications, and virtual directories.
  89. An IIS server uses the concepts of ____, ____, and ____.
    sites, applications, and virtual directories
  90. ____ provide a way to invoke remote objects using standard technologies such as XML and HTTP.
    Web services
  91. ____ is the protocol that defines how remote computers exchange messages as part of Web service communication.
    SOAP

    Originally an acronym for Simple Object Access protocol, is a protocol specification for exchanging structured information in the implementation of web services in computer networks.
  92. SOAP relies on ____ for its message format and uses ____ for message transmission.
    XML, HTTP
  93. ____ provides a standard by which a Web service can tell its client what kinds of messages it will accept and what results will be returned.
    Web Service Definition Language (WSDL)

    WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint.
  94. A ____ is a visual surface that can display a variety of controls, such as text boxes, buttons, and menus.
    Windows Form

    Visual Studio provides a drag-and-drop Windows Forms designer that you can use to create applications.
  95. Before a Windows service can be used, it must be installed in the ____.
    Windows Registry

    To do this, add the Installer component to the Windows Service Application. This will allow you to install the Windows service using an installation tool such as InstallUtil.exe.
  96. A relational database organizes information into ____.
    tables

    A table is a collection of rows and columns.
  97. ____ is the process of determining the appropriate relational database structure to satisfy the business requirements.
    Relational database design
  98. The ____ diagrams can help you in determine what data needs to be stored in a database.
    entity-relationship

    Entity-relationship diagrams are used to model the entities, their attributes, and the relationships among entities.
  99. The process of data ____ ensures that a database design is free of any problems that could lead to loss of data integrity.
    normalization

    Most design issues can be resolved by ensuring that the tables satisfy the requirements of the third normal form.
  100. The ____ provides statements such as SELECT, INSERT, UPDATE, and DELETE to work with relational data.
    Structured Query Language (SQL)
  101. A ____ is a set of SQL statements that is stored in a database.
    stored procedure

    Stored procedures can be used by multiple applications.
  102. The ____ and ____ classes provide a fast, noncached, forward-only way to read or write XML data. The XmlDocument class is an in-memory representation of XML data and allows navigation and editing of the XML document.
    XmlReader, XmlWriter
  103. The ____ class is an in-memory representation of XML data and allows navigation and editing of the XML document.
    XmlDocument
  104. The ____ class represents an in-memory representation of relational data. The ___ class acts as a bridge between the data source and the DataSet.
    DataSet, DataAdapter

    The DataAdapter stores the data connection and data commands needed to connect to the data source.
  105. In ____ testing, testers use their knowledge of system internals to assess the system.
    white-box
  106. Usually, with every new fix, software testers run a battery of ____ to make sure that all functionality that was known to be working is still working.
    regression tests
  107. The BubbleSort algorithm uses a series of ____ and ____ operations to arrange the elements of a list in the correct order.
    swap, comparison
  108. A(n) ____ is a collection of items in which the last item added to the collection is the first one to be removed.
    stack or LIFO
  109. ____ is the process of determining the detailed business requirements for a new software system.
    Requirements Analysis
  110. A linked list is a collection of nodes such that each node contains a(n) ____ to the next node in the sequence.
    link or reference
  111. The ____ operation adds an item to a queue, whereas the ____ operation removes an item from a queue.
    enqueue, dequeue
  112. The QuickSort algorithm uses ____ and ____ operations to arrange the elements of a list in the correct order.
    partitioning and comparison
  113. A(n) ____ is responsible for analyzing business needs and converting them into requirements that can be executed by the development team.
    business analyst
  114. Alpha testing and beta testing both are part of the ____ testing of a system.
    acceptance
  115. The product that you are developing is not yet finished, but you would like to release the product to a wider customer audience for feedback and testing. Under which of the following testing levels would this activity fall?

    A. Integration testing
    B. System testing
    C. Acceptance testing
    D. Regression testing
    C. Acceptance testing
    (this multiple choice question has been scrambled)
  116. The testers of a software application have access to its source code, and they plan to write test cases that ensure that the methods return correct values. Which of the following testing levels will this activity fall under?

    A. Integration testing
    B. Unit testing
    C. Beta testing
    D. Alpha testing
    B. Unit testing
    (this multiple choice question has been scrambled)
  117. Which of the following data structures allows direct access to all of its items?

    A. Queue
    B. Array
    C. Stack
    D. Linked list
    B. Array

    An array is a collection of items stored in a contiguous memory location and addressed using one or more indices.

    A stack is a collection of items in which the last item added to the collection is the first one to be removed.

    A queue is a collection of items in which the first item added to the collection is the first one to be removed.

    A linked list is a collection of nodes arranged so that each node contains a link to the next node in the sequence.
    (this multiple choice question has been scrambled)
  118. Which of the following activities in the application lifecycle is used by an architect to create the technical blueprint of a system?

    A. Requirements analysis
    B. Design
    C. Maintenance
    D. Development
    B. Design
    (this multiple choice question has been scrambled)
  119. In your application, you are using a queue data structure to manipulate information. You need to find which data item will be processed next, but you don’t want to actually process that data item yet. Which of the following queue operations will you use?

    A. Contains
    B. Peek
    C. Enqueue
    D. Dequeue
    B. Peek
    (this multiple choice question has been scrambled)
  120. You are developing a program that requires you to track the method calls. You can only invoke one method at a time. However, a method call may in turn invoke other methods. When a method ends, it returns control back to the calling method. Which data structure should you use to keep track of these method calls?

    A. Stack
    B. Linked list
    C. Array
    D. Queue
    A. Stack

    A stack is a collection of items in which the last item added to the collection is the first one to be removed.

    An array is a collection of items stored in a contiguous memory location and addressed using one or more indices.

    A queue is a collection of items in which the first item added to the collection is the first one to be removed.

    A linked list is a collection of nodes arranged so that each node contains a link to the next node in the sequence.
    (this multiple choice question has been scrambled)
  121. You are developing a program that simulates a job processor. Often, the jobs come faster than you can process them, and in such cases, the jobs wait for their turn to be processed. You need to make sure that the job that arrived first is the first to be processed as well. Which of the following data structures is best suited for this requirement?

    A. Array
    B. Linked list
    C. Stack
    D. Queue
    D. Queue

    A queue is a collection of items in which the first item added to the collection is the first one to be removed.

    A stack is a collection of items in which the last item added to the collection is the first one to be removed.

    An array is a collection of items stored in a contiguous memory location and addressed using one or more indices.

    A linked list is a collection of nodes arranged so that each node contains a link to the next node in the sequence.
    (this multiple choice question has been scrambled)
  122. You write the following code in a program:

    var numbers = new[]{2, 3, 1, 4};
    numbers [2] = 4;

    What will be the contents of the array after the second statement is executed?

    A. {2, 4, 1, 2}
    B. {2, 3, 4, 4}
    C. {2, 4, 1, 4}
    D. {4, 3, 1, 4}
    B. {2, 3, 4, 4}
    (this multiple choice question has been scrambled)
  123. You are developing a program that performs frequent insert and delete operations on the data. Your requirement also dictates the capability to access previous and next records when the user presses the previous or next button. Which of the following data structures will best suit your requirements?

    A. Doubly linked list
    B. Array
    C. Circular linked list
    D. Linked list
    A. Doubly linked list

    A linked list is a collection of nodes arranged so that each node contains a link to the next node in the sequence.

    In contrast, in a doubly linked list, each node contains two links, one for the node before, and one for the node after.

    A Circular linked list is exactly the same as a double linked list except that the 'next' link for the last node points to the first node and the 'previous' link in the first node points to the last node.  There is no native 'Circular linked list' in C#, although it is a fairy simple matter to extend the Double Linked List to create one.

    An array is a collection of items stored in a contiguous memory location and addressed using one or more indices.
    (this multiple choice question has been scrambled)
  124. You are developing a program that performs frequent insert and delete operations on the data. The data items need to be accessed like a stack with last-in, first-out functionality. Your solution must require as little memory as possible. Which of the following data structures will best suit these requirements?

    A. Circular linked list
    B. Array
    C. Doubly linked list
    D. Linked list
    D. Linked list

    A linked list is a collection of nodes arranged so that each node contains a link to the next node in the sequence.

    In contrast, in a doubly linked list, each node contains two links, one for the node before, and one for the node after.

    There is no native 'Circular linked list' in C#, although it is a fairy simple matter to extend the Double Linked List to create one.  A circular linked list is exactly the same as a double linked list except that the 'next' link for the last node points to the first node and the 'previous' link in the first node points to the last node. 

    An array is a collection of items stored in a contiguous memory location and addressed using one or more indices.
    (this multiple choice question has been scrambled)
  125. In the HTML anchor tag, the ____ attribute specifies the target URL.
    href
  126. You can put CSS code in a separate file and link it to a Web page through use of the HTML ____ element.
    link
  127. The JavaScript code on a Web page is executed on the ____.
    client-side
  128. You can use a(n) ____ element to display a specific message to users when their browser is not running JavaScript.
    noscript
  129. You can disable ViewState at the page level by setting the ____ attribute of the Page directive to false in the ASP.NET page.
    EnableViewState
  130. The ____ state is used to store data that is used globally throughout an application, as opposed to the ____ state, which stores data for a user session.
    application, session
  131. A Web application is accessed using a(n) ____ name instead of a physical folder name.
    virtual directory
  132. You must mark classes with the ____ attribute to expose them as a Web service.
    WebService
  133. Of all the methods in a Web service class, only those marked with ____ attributes are exposed as Web service methods.
    WebMethod
  134. SOAP relies on ____ as its message format and uses ____ for message transmission.
    XML, HTTP
  135. You write the following code for your Web page:
    <head><title>Sample Page</title>
      <style type='text/css'>
      div  {font-family: Verdana;
        font-size: 9pt;}</style>
    </head>
    <body>
      <div style='font-weight: bold; font-size:12pt;">Sample Text </div><body>

    What would be the style for text displayed as part of the element?

    A. Font family: Verdana; font weight: bold; font size: 12pt
    B. Font family: Verdana; font size: 12pt
    C. Font family: Verdana; font weight: bold; font size: 9pt
    D. Font family: Verdana; font size: 9pt
    A. Font family: Verdana; font weight: bold; font size: 12pt
    (this multiple choice question has been scrambled)
  136. You are developing a mapping Web site that allows users to interactively explore maps using actions such as panning and zooming. You want the Web site to be responsive and accessible in most modern Web browsers. However, you do not want users to need to install additional plug-ins in order to use your Web site. Which of the following technologies should you use to display maps?

    A. JavaScript
    B. HTML
    C. Adobe Flash
    D. Server-side programming technology such as ASP.NET
    A. JavaScript
    (this multiple choice question has been scrambled)
  137. Your ASP.NET page contains a page-level variable of Customer type. You want to preserve the value of this variable across page postbacks, but you do not need this variable in any other page in the application. Which of the following state-management techniques is the best way to achieve this?

    A. Cookies
    B. Session
    C. ViewState
    D. Query strings
    C. ViewState

    ViewState is the mechanism ASP.NET uses to maintain the state of controls across page postbacks. To facilitate this, when ASP.NET
    executes a page, it collects the values of all nonpostback controls that are modified in the code and formats them into a single encoded string. This string is stored in a hidden field in a control named  __VIEWSTATE.

    Query strings: Here, state is maintained by putting the data as a set of key-value
    pairs in the query string portion of a page URL.

    Cookies are small packets of information that are stored by a Web browser locally on the user’s computer. Cookies are commonly employed to store user preferences and shopping cart contents and to give users a
    personalized browsing experience on subsequent visits to a Web page. The
    HttpCookie class represents a cookie in your code.

    Hidden fields contain information that is not displayed on a Web page but is still part of the page’s HTML code. Hidden fields can be created by using the <input type=“hidden”> HTML element. The ASP.NET HTML
    Server control HtmlInputHidden also maps to this HTML element.
    (this multiple choice question has been scrambled)
  138. You are developing a Web application for an online bank. Your application enables users to access their account information and transactions from within a Web browser. When a user logs onto the Web application, you want to show the username and account balance on all pages of the application until the user logs off. You also want this application to be safe from malicious users. Which of the following state-management techniques should you use?

    A. ViewState with encryption
    B. Session
    C. Cookies
    D. ViewState
    B. Session

    Session state: An ASP.NET application creates a unique session for each user who sends a request to the application. ASP.NET distinctly identifies each of these sessions by sending a unique SessionId to the requesting URL. This SessionId is transmitted as a cookie or embedded in the URL, depending
    on the application’s configuration. The ability to uniquely identify and relate requests can be used to store session-specific data that is also known as the session state of the Web application. A common example of session state is storing shopping cart contents for users as they browse through a Web-based store.

    *TAKE NOTE: The session state can be configured for storage on another server or a SQL server. This is useful when a user’s request can be processed by one of the many servers in a Web farm. A Web farm is a collection of Web servers used collectively to serve a Web site. Web farms are necessary to support traffic on popular
    Web sites.

    ViewState is the mechanism ASP.NET uses to maintain the state of controls across page postbacks. To facilitate this, when ASP.NET executes a page, it collects the values of all nonpostback controls that are modified in the code and formats them into a single encoded string. This string is stored in a hidden field in a control named  __VIEWSTATE.

    Cookies are commonly employed to store user preferences and shopping cart contents and to give users a personalized browsing experience on subsequent visits to a Web page. The HttpCookie class represents a cookie in your code.
    (this multiple choice question has been scrambled)
  139. You are developing a Web form to display weather information. When a user requests the Web form, the form needs to perform some initialization to change its appearance and assign values to some controls. Where should you put the code?

    A. In the Init event handler of the Page class
    B. In the Load event handler of the Page class
    C. In the PreRender event handler of the Page class
    D. In the PreInit event handler of the Page class
    B. In the Load event handler of the Page class

    Asp .Net Page Life Cycle Events:

    At each stage of the page life cycle, the page raises some events, which could be coded. An event handler is basically a function or subroutine, bound to the event, using declarative attributes like Onclick or handle.

    Asp.Net 3.5 & 4.0 page life cycle has following events in sequence :

    PreInit is entry point of page life cycle. It checks IsPostBack property to check or recreate dynamic controls. In this we can set master pages dynamically & set and get profile property values.

    Init is raised after all controls of page are initialized and skin properties are set. It is used to read or initialize control properties.

    InitComplete indicates that page is completely initialized.

    Preload  is called before loading the page in the RAM(memory). If any processing on a control or on page is required we use it. Load This invokes the onload event of the page. In this we create connection to the database, get/set controls values and get/set view state values.

    loadComplete This indicates that page is completely loaded into memory.

    Prerender.  We use this event to make final changes to the controls or page before rendering it to the browser.

    SaveStateComplete. View state of each control is saved before this event occurs. If we want to change the view state of any control then we use this event. This event can not be used to change the other properties of the controls.

    Render/PrenderComplete indicates that page is completely rendered to the browser.

    Before rendering, view state is saved for the page and all controls. During the rendering stage, the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream object of the page's Response property.

    The Unload event is raised after the page has been fully rendered, sent to the client, and is ready to be discarded. At this point, page properties such as Response and Request are unloaded and cleanup is performed.

    We can use this event for closing files & database connection. This event occurs for each control.
    (this multiple choice question has been scrambled)
  140. You want to display values of the C# expressions in an ASP.NET page. Which of the following types of code blocks should you use to enclose the expression?

    A. <script runat=“server”> … </script>
    B. <%= … %>
    C. <form>…</form>
    D. <script> … </script>
    B. <%= … %>

    The <form> tag is used to create an HTML form for user input.

    The <script> tag is used to define a client-side script, such as a JavaScript.
    The <script> element either contains scripting statements, or it points to an external script file through the src attribute. Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content.

    There is no 'runat' attribute for the script tag.
    (this multiple choice question has been scrambled)
  141. You have developed a timesheet application that will be used by all employees in your company. You used ASP.NET to develop this application and have deployed it on the company’s Web server. What must all employees of the company install on their computers before they can access the timesheet application?

    A. A Web browser
    B. .NET Framework Software Development Kit
    C. Visual Studio
    D. .NET Framework Redistributable
    A. A Web browser

    No installation, other than a web browser, is required for ASP.NET applications unless the application uses SilverLight or some other external component.  The question doesn't specifically state any external components were used for the development of the web application, therefore only a browser is required on the client side.
    (this multiple choice question has been scrambled)
  142. Your client application calls for a Web service that performs complex, time-consuming calculations. A user complains that while results are being returned, the user interface freezes momentarily. Which approach should you take to solve this issue?

    A. You should upgrade to a faster Internet connection.
    B. You should use asynchronous calls to invoke the Web service.
    C. You should install a better processor on the Web server.
    D. You should install a better processor on the client computer.
    B. You should use asynchronous calls to invoke the Web service.

    A better processor on the web server may or may not help with the timing issue.  This may be due to other processes that can't be improved for some reason. 

    A better processor on the client will not help at all with this situation.

    A faster internet connection probably will not help because the issue is that the server is performing time consuming calculations, which is not related to network connection speed.

    Additionally, none of these addresses a programming issue.  The only solution that presents a solution that can be implemented through programming is to use asynchronous calls on the web service.
    (this multiple choice question has been scrambled)
  143. You have created an ASP.NET Web service that converts one currency into another. One of the methods in your Web service is defined with the following code:

    public double Convert(double amount,
    string from, string to)
    {
    // code to perform currency conversion
    }

    The users of the Web service report that they can set a reference to the Web service but the Convert method is not available to them. What could be the problem?

    A. The Web service class is not marked with the WebService attribute.
    B. Web services can only expose methods that return text values.
    C. The .asmx file for the Web service is not available on the Web server.
    D. The Convert method is not marked with the WebMethod attribute.
    B. Web services can only expose methods that return text values.

    Although it is true that methods exposed through a web service must have the WebMethod attribute, the ultimate issue is that web service methods can only return string values.  A proper solution would be to return an XML string that specifies the data type for each node.
    (this multiple choice question has been scrambled)
  144. You are working on two Visual Studio projects. The first project is a Web service that returns a DataSet object belonging to the System.Data namespace. The second project accesses the Web service created by the first project. Which project in this scenario requires a reference to the System.Data namespace?

    A. The client project that accesses the Web service
    B. Neither the client project nor the Web service project
    C. The Web service project
    D. Both the client project and the Web service project
    D. Both the client project and the Web service project

    Because web methods can only return strings, the value that will be passed would be in the form of an XML string.  The server will serialize the DataSet to send it to the client, the client will deserialize the string back into a DataSet object.
    (this multiple choice question has been scrambled)
  145. Use the ____ property of the ServiceInstaller class to specify a brief comment that explains the purpose of the service.
    description
  146. The ___ property of the ___ class indicates the account type under which a Windows service will run.
    account, ServiceProcessInstaller
  147. The ____ property of the EventLog class is used to specify the application name to use when writing to an event log.
    source
  148. ____ allows you to reuse existing functionality and layout for Windows Forms.
    Visual inheritance
  149. ____ applications are applications in which multiple child windows reside under a single parent window.
    Multiple Document Interface (MDI)
  150. A(n) ____ is ideal for creating long-running applications that run in the background and do not have any user interface.
    windows service
  151. ____ do not have a graphical user interface and use a text-mode console window to interact with the user.
    A console-based application
  152. ____ applications provide their own window management functionality, whereas ____ applications rely on the operating system for window management.
    MDI, SDI
  153. A delegate can be bound to any method whose signature matches that of the ____.
    delegate declaration
  154. The ____ can be bound to more than one method, allowing one-to-many notifications when an event is fired.
    MulticastDelegate

    MulticastDelegate is a special class. Compilers and other tools can derive from this class, but you cannot derive from it explicitly. The same is true of the Delegate class.

    In addition to the methods that delegate types inherit from MulticastDelegate, the common language runtime provides two special methods: BeginInvoke and EndInvoke. For more information about these methods, see Calling Synchronous Methods Asynchronously.

    • A MulticastDelegate
    • has a linked list of delegates, called an invocation list, consisting of one or more elements. When a multicast delegate is invoked, the delegates in the invocation list are called synchronously in the order in which they appear. If an error occurs during execution of the list then an exception is thrown.
  155. You need to design a Windows service that cannot be paused. Which of the following options will help you accomplish this task?

    A. Set the CanStart property of the Windows service to True, but set the CanShutdown property to False.
    B. Set the CanPauseAndContinue property of the Windows service to True.
    C. Do not override the OnPause and OnContinue methods in the Windows service.
    D. Set the CanPauseAndContinue property of the Windows service to False.
    D. Set the CanPauseAndContinue property of the Windows service to False.
    (this multiple choice question has been scrambled)
  156. You have developed a Windows service. You need to install this service in order to install its functionality. Which of the following options should you choose to accomplish this task?

    A. User the Services node in the Computer Management window.
    B. Use gacutil.exe.
    C. Use InstallUtil.exe.
    D. Use the Visual Studio Server Explorer.
    C. Use InstallUtil.exe.
    (this multiple choice question has been scrambled)
  157. You have developed a Windows service. This service need to run as a non-privileged user in order to minimize any possible security risk. Which of the following accounts should you use for running this Windows service?

    A. LocalSystem
    B. NetworkService
    C. User (where the UserName property is set to a member of administrator role)
    D. LocalService
    D. LocalService
    (this multiple choice question has been scrambled)
  158. You are designing a Windows service application that contains only one Windows service. You would like this service to be started automatically when the computer is restarted. Which of the following classes should you use to specify this setting?

    A. ServiceProcessInstaller
    B. ServiceInstaller
    C. ServiceController
    D. ServiceBase
    B. ServiceInstaller
    (this multiple choice question has been scrambled)
  159. You need to change the display and behavior of a Windows Form so that the form can contain multiple child windows. What should you do?

    A. Set the MdiParent property for all the child windows.
    B. Set the MdiChild property of the form.
    C. Set the IsMdiContainer property of the form to True.
    D. Set the IsMdiChild property of the form.
    C. Set the IsMdiContainer property of the form to True.
    (this multiple choice question has been scrambled)
  160. You are developing a Windows Form that responds to mouse events. When the mouse moves, you need to invoke the method Form1_HandleMouse. Any code that you write should not affect any existing event-handling code. What statement should you use to attach the event handler to the event?

    A. this.MouseMove += new MouseEventHandler (Form1_HandleMouse);
    B. this.MouseDown = new MouseEventHandler (Form1_HandleMouse);
    C. this.MouseMove = new MouseEventHandler (Form1_HandleMouse);
    D. this.MouseDown += new MouseEventHandler (Form1_HandleMouse);
    A. this.MouseMove += new MouseEventHandler (Form1_HandleMouse);
    (this multiple choice question has been scrambled)
  161. You are developing a Windows Form with a multiple document interface (MDI). You need to write code that arranges the child windows vertically within the client region of the MDI parent form. Which of the following statements should you use?

    A. LayoutMdi(MdiLayout.Cascade);
    B. LayoutMdi(MdiLayout.TileVertical);
    C. MdiLayout(LayoutMdi.TileVertical);
    D. MdiLayout(LayoutMdi.Cascade);
    B. LayoutMdi(MdiLayout.TileVertical);
    (this multiple choice question has been scrambled)
  162. You are developing an application that will be run from the command line. Which of the following methods would you use for output to the command line?

    A. Console.Write
    B. Console.Read
    C. File.Write
    D. File.Read
    A. Console.Write
    (this multiple choice question has been scrambled)
  163. You want to develop an application that displays a visual surface capable of displaying a variety of controls, such as text boxes, buttons, and menus. The application should also allow multiple child windows to reside under a single parent window. Which of the following types of application should you develop?

    A. Single document interface (SDI) application
    B. Multiple document interface (MDI) application
    C. Console-based application
    D. Windows service application
    B. Multiple document interface (MDI) application
    (this multiple choice question has been scrambled)
  164. You are extending an existing Windows application. You would like to create a new form that derives its visual characteristics (including size, color, and some controls) from a previously created form. Which technique should you use to create the new form?

    A. Visual encapsulation
    B. Visual abstraction
    C. Visual polymorphism
    D. Visual inheritance
    D. Visual inheritance
    (this multiple choice question has been scrambled)
  165. In order for a table to be in the ____ Normal Form, none of the columns should have multiple values in the same row of data.
    First Normal Form
  166. The ___ Normal Form requires that all non-key columns are functionally dependent on the entire primary key.
    Second Normal Form
  167. The ___ Normal Form requires that there is no functional dependency among non-key attributes.
    Third Normal Form
  168. The basic building blocks for an entity-relationship diagram are ___, ___, and ___.
    Entity, Attribute, and Relationship
  169. The ___ clause in a SELECT statement evaluates each row for a condition and decides whether to include it in the result set.
    WHERE
  170. The object used with the using statement must implement the ___ interface.
    IDisposable
  171. T-SQL’s ___ statement can be used to create a stored procedure.
    CREATE PROCEDURE
  172. In the process of ___, you apply a set of rules to ensure that your database design helps with data integrity and
    normalization
  173. You find classes for working with streams and backing stores in the ___ namespace.
    System.IO
  174. The ___ format is a hierarchical data representation format.
    XML
  175. Your application needs to store the product image out to a disk file. You’d like to minimize the size of this disk file. Which of the following objects should you use to write the file?

    A. XmlWriter
    B. FileStream
    C. BinaryWriter
    D. StreamWriter
    C. BinaryWriter

    Binary files store their content as a sequence of bytes. Although binary files are not human-readable like text files, they are capable of storing a variety of data, such as images, sounds, video, etc. You will always need a computer program to interpret the contents of a binary file. The BinaryReader and BinaryWriter classes provide you with an easy way to manipulate binary files.

    Flat files can be in either plain-text or binary format. Text files are often organized as lines of text separated by end-of-line characters. The StreamReader and StreamWriter classes provide you with an easy way to manipulate such text files.

    XmlWriter provides a fast, noncached, forward-only way to write XML data.

    Use the FileStream class to read from, write to, open, and close files on a file system, and to manipulate other file-related operating system handles, including pipes, standard input, and standard output. You can use the Read, Write, CopyTo, and Flush methods to perform synchronous operations, or the ReadAsync, WriteAsync, CopyToAsync, and FlushAsync
    methods to perform asynchronous operations. Use the asynchronous methods to perform resource-intensive file operations without blocking the main thread. This performance consideration is particularly important in a Windows Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. FileStream buffers input and output for better performance.
    (this multiple choice question has been scrambled)
  176. Your C# program needs to return the total number of customers in a database. The program will be used several times a day. What is the fastest way to return this information from your program?

    A. Create a stored procedure to return the total number of customers, then use the SqlDataAdapter.Fill method to execute the stored procedure.
    B. Write a SQL query and use the SqlCommand.ExecuteScalar method to execute the query.
    C. Write a SQL query and use the SqlDataAdapter.Fill method to execute the query.
    D. Create a stored procedure to return the total number of customers, then use the SqlCommand.ExecuteScalar method to execute the stored procedure.
    D. Create a stored procedure to return the total number of customers, then use the SqlCommand.ExecuteScalar method to execute the stored procedure.
    (this multiple choice question has been scrambled)
  177. You need to modify the records in a Products table by marking certain products as Discontinued. However, you need to do this only when the UnitsInStock and UnitsOnOrder are both zero. Which of the following SQL statements should you use?

    A. DELETE
    B. SELECT
    C. UPDATE
    D. INSERT
    C. UPDATE
    (this multiple choice question has been scrambled)
  178. You need to update the Region fields for customers in Japan. You write the following SQL UPDATE statement:

    UPDATE Customers SET Region = ‘EastAsia’

    You test the query on a test database and find that more records were affected than you expected. You need to correct the SQL statement.

    What should you do?

    A. Add a WHERE clause to the UPDATE statement.
    B. Add a GROUP BY clause to the UPDATE statement.
    C. Add a HAVING clause to the UPDATE statement.
    D. Add an additional SET clause to the UPDATE statement.
    A. Add a WHERE clause to the UPDATE statement.
    (this multiple choice question has been scrambled)
  179. You are developing an application that needs to retrieve a list of customers from a SQL Server database. The application should move through the list sequentially once, processing each customer’s record. Which of the following classes should you use to hold the customer list in order to achieve maximum performance?

    A. DataSet
    B. DataView
    C. SqlDataReader
    D. DataTable
    C. SqlDataReader

    The SqlDataReader is the only class here that represents an object that is designed to retrieve data from outside of the application.  It provides a way of reading a forward-only stream of rows from a SQL Server database.

    A DataSet represents an in-memory cache of data and contains DataTables.

    A DataTable is an object within a DataSet that represents one table of in-memory data.

    A DataView epresents a databindable, customized view of a DataTable for sorting, filtering, searching, editing, and navigation. The DataView does not store data, but instead represents a connected view of its corresponding DataTable. Changes to the DataView’s data will affect the DataTable. Changes to the DataTable’s data will affect all DataViews associated with it.
    (this multiple choice question has been scrambled)
  180. The application you are developing needs to read data from a flat file that include items such as a five-digit integer key, followed by a 20-character customer name, followed by two date and time fields. Which of the following classes should you use?

    A. BinaryReader
    B. StreamReader
    C. FileStream
    D. DataReader
    A. BinaryReader

    The BinaryReader class provides methods that simplify reading primitive data types from a string.  For example, you can use the ReadBoolean method to read the next byte as a Boolean value and advance the current position in the stream by one byte.  The class includes read methods that support different data types.

    StreamReader is designed for character input in a particular encoding, whereas the Stream class is designed for byte input and output. Use StreamReader for reading lines of information from a standard text file.

    You use the Read method of the DataReader
    object to obtain a row from the results of the query. You can access each column of the returned row by passing the name or ordinal reference of the column to the DataReader. However, for best performance, the DataReader provides a series of methods that allow you to access column values in their native data types (GetDateTime, GetDouble, GetGuid, GetInt32, and so on). For a list of typed accessor methods for data provider-specific DataReaders, see OleDbDataReader and SqlDataReader.  Using the typed accessor methods, assuming the underlying data type is known, reduces the amount of type conversion required when retrieving the column value.

    A FileStream exposes a Stream around a file, supporting both synchronous and asynchronous read and write operations.  Use the FileStream class to read from, write to, open, and close files on a file system, and to manipulate other file-related operating system handles, including pipes, standard input, and standard output. You can use the Read, Write, CopyTo, and Flush methods to perform synchronous operations, or the ReadAsync, WriteAsync, CopyToAsync, and FlushAsync methods to perform asynchronous operations. Use the asynchronous methods to perform resource-intensive file operations without blocking the main thread. This performance consideration is particularly important in a Windows Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. FileStream buffers input and output for better performance.
    (this multiple choice question has been scrambled)
  181. You are developing an application that will need to copy data from a SQL Server view to a DataSet. You name the DataSet object dsData.

    Which of the following methods should you use to copy the data?

    A. Fill
    B. SelectCommand
    C. InsertCommand
    D. Update
    A. Fill
    (this multiple choice question has been scrambled)
  182. You are developing an application that manages customers and their orders. Which of the following situations is not a good candidate for implementation with stored procedures in your application?

    A. Ad hoc querying by the database administrator
    B. Retrieving the list of all customers in the database
    C. Inserting a new order into the Orders table
    D. Retrieving the list of all orders for particular customers
    A. Ad hoc querying by the database administrator
    (this multiple choice question has been scrambled)
  183. Your application connects to a SQL Server database that contains a table called Employees with the following columns:

    EmployeeID (int, identity)
    EmployeeType (char(1))
    EmployeeDate (datetime)

    You need to write a query that deletes all rows from the table where the EmployeeType value is either C or T. You do not want to delete any other rows. Which statement should you use?

    A. DELETE FROM Employees WHERE EmployeeType LIKE ‘[C-T]’
    B. DELETE FROM Employees WHERE EmployeeType LIKE ‘[CT]’
    C. DELETE * FROM Employees WHERE EmployeeType IN (‘C’, ‘T’)
    D. DELETE FROM Employees WHERE EmployeeType LIKE ‘C’ OR ‘T’
    B. DELETE FROM Employees WHERE EmployeeType LIKE ‘[CT]’
    (this multiple choice question has been scrambled)
  184. You need to gain a better understanding of the solution before writing the program. Youdecide to develop an algorithm that lists all necessary steps to perform an operation in the correct order. Any technique that you use should minimize complexity and ambiguity. Which of the following techniques should you use?

    A) A paragraph in English
    B) decision table
    C) C# program
    D) flowchart
    D) flowchart
    (this multiple choice question has been scrambled)
  185. Your application includes a SqlDataAdapter object named sqlDataAdapter that connects to the Employees table. Based on this SQLDataAdapter, your application also includes a DataSet object dsEmployees. What line of code should you use to load the data from the database into the DataSet object?

    A. sqlDataAdapter.Fill("dsEmployees", "Employees");
    B. sqlDataAdapter.Fill(dsEmployees);
    C. sqlDataAdapter.Fill(dsEmployees, "Employees");
    D. dsEmployees = sqlDataAdapter.Fill("Employees");
    C. sqlDataAdapter.Fill(dsEmployees, "Employees");

    The first parameter is the dataSet to fill with records and, if necessary, schema.

    The second parameter is the name of the source table to use for table mapping.
    (this multiple choice question has been scrambled)
  186. Which of the following languages is not considered a high-level programming language?

    A) Common Intermediate Language
    B) Visual Basic
    C) C#
    D) C++
    A) Common Intermediate Language
    (this multiple choice question has been scrambled)
  187. You are writing code for a business application by using C#. You write the following statement to declare an array:

    int[] numbers = new [] { 1, 2, 3, 4, 5 };

    Now, you need to access the second item in this array (the number 2). Which of the following expression should you use?

    A) numbers[1]
    B) numbers[2]
    C) numbers[3]
    D) numbers[0]
    A) numbers[1]

    Arrays have zero-based accessors, so the first item is item 0, the second is item 1, and so on.
    (this multiple choice question has been scrambled)
  188. You are developing a C# program. You write the following code:

    int x = 10;int y = ++x;int z = y++;

    What will be the value of the variable z after all the above statements are executed?

    A) 10
    B) 12
    C) 13
    D) 11
    D) 11

    When the variable y is assigned the value of x, it '++' that precedes it will cause the variable to increment before it is accessed.  However, when the value is assigned for variable z, the '++' that follows increments the y variable after the operation.
    (this multiple choice question has been scrambled)
  189. You are writing a method named PrintReport that doesn’t return a value to the calling code. Which keyword should you use in your method declaration to indicate this fact?

    A) private
    B) void
    C) string
    D) int
    B) void

    Private indicates which code has access to the method.  It doesn't have anything to do with the return value.

    Using 'string' or 'int' would indicate that this type of value will be returned out of the method. 

    Using the keyword 'void' indicates that there is no value being returned from the method.
    (this multiple choice question has been scrambled)
  190. You need to provide complex multi-way branching in your C# program. You need to make sure that your code is easy to read and understand. Which of the following C# statements should you use?

    A) case
    B) break
    C) if-else
    D) switch
    D) switch

    The case statement is used for each component of the switch statement. 

    The break command breaks out of each case for a switch, or a loop for recursive structures.

    if-else is not used for branching, but for indicating which of two blocks of code should be executed based on a boolean value.
    (this multiple choice question has been scrambled)
  191. You are writing a C# program that iterates through a collection such as arrays and lists. You need to make sure that you process each item in the collection once. You also need to ensure that your code is easy to read and debug. Which of the following C# statements provide the best solution for this requirement?

    A) while
    B) for
    C) foreach
    D) do-while
    C) foreach

    A foreach block can be used for structures that implement the iEnumerable interface.  The structure is as follows:

    foreach(var value in structure)
    {
    //do work
    }

    A for loop can be used if the structure does not implement the iEnumberable interface as follows:

    for(var i = 0; i < array.count; i++)
    {
    // Do work here
    }

    The while and do-while loops execute code until a particular condition is met.
    (this multiple choice question has been scrambled)
  192. You are developing a C# program that needs to perform 5 iterations. You write the following code:

    01: int count = 0;
    02: while (count <= 5)
    03: {
    04: Console.WriteLine("The value of count = {0}", count);
    05: count++;
    06: }

    When you run the program, you notice that the loop does not iterate five times. What should you do to make sure that the loop is executed exactly five times?

    A) Change the code in line 02 to: while (count == 5)
    B) Change the code in line 05 to: ++count;
    C) Change the code in line 02 to: while (count >= 5)
    D) Change the code in line 01 to: int count = 1;
    D) Change the code in line 01 to: int count = 1;

    The count variable in the code starts at 0, so to get to 5, it must iterate 6 times.  To facilitate forcing the loop to only execute 5 times, the count variable must begin at 1 or the while condition must be:

    while (count <= 4)
    or
    while (count < 5)
    (this multiple choice question has been scrambled)
  193. You are developing a C# program. You write a recursive method to
    calculate the factorial ofa number. Which of the following code segment
    should you use to generate correct results?

    a) public static int Factorial(int n){
     if (n == 0) return 1;
     return n * Factorial(n - 1);
     }
    b) public static int Factorial(int n){
     if (n == 0) return 1;
     return (n – 1) * Factorial(n);
     }
    c) public static int Factorial(int n){
     if (n == 0) return n;
     else return Factorial(n - 1);
     }
    d) public static int Factorial(int n){
     return n * Factorial(n - 1);
     }
    • a) public static int Factorial(int n){
    • if (n == 0) return 1;
    • return n * Factorial(n - 1);
    • }
  194. You are developing a C# program. You write the following code:

    01: int count = 0;
    02: while (count < 5)
    03: {
    04: if (count == 3)
    05: break;
    06: count++;
    07: }

    How many times will the control enter the while loop?

    A) 5
    B) 2
    C) 3
    D) 4
    D) 4

    If the internal if statement weren't part of the code, then the loop would occur 5 times.  The break statement within the if statement causes the code to break out of the while loop at count 3.  Since the count starts at 0, it allows the loop to execute 4 times.
    (this multiple choice question has been scrambled)
  195. You are developing a C# program. You write the following code:

    int i = 6;
    do{ 
    if (i == 3) break;
    Console.WriteLine("The value of i = {0}", i);
    i++;
    } while (i <= 5);

    How many times will the control enter the while loop?

    A) 1
    B) 3
    C) 2
    D) 0
    A) 1

    Because the condition is in the while, the block will execute once before the condition is checked.
    (this multiple choice question has been scrambled)
  196. You are writing a C# program and need to select an appropriate repetition structure for your requirement. You need to make sure that the test for the termination condition is performed at the bottom of the loop rather than at the top. Which repletion structure should you use?

    A) The foreach statement
    B) The while statement
    C) The for statement
    D) The do-while statement
    D) The do-while statement
    (this multiple choice question has been scrambled)
  197. You are writing a C# program. You write the following method:

    public static void TestSwitch(int op1, int op2, char opr)

    int result; 
    switch (opr) 

    case '+': 
    result = op1 + op2; 
    case '-': 
    result = op1 - op2; 
    case '*': 
    result = op1 * op2; 
    case '/': 
    result = op1 / op2; 
    default: 
    Console.WriteLine("Unknown Operator"); 
    return; 

    Console.WriteLine("Result: {0}", result); 
    return;
    }

    However, when you compile this code, you get the following error message:

    Control cannot fall through from one case label to another

    How should you modify the code to make sure that it compiles successfully?

    A) After each case, add a continue statement
    B) After each case, add a goto default statement
    C) After each case, add a break statement
    D) After each case, add a return statement
    C) After each case, add a break statement

    Although you can also break out of a case with a return statement, the above code has code that needs to execute after the switch, so a break statement must be used.
    (this multiple choice question has been scrambled)
  198. You are writing a C# program that needs to iterate a fixed number of times. You need to make sure that your code is easy to understand and maintain even when the loop body contains complex code. Which of the following C# statements provide the best solution for this requirement?

    A) while
    B) foreach
    C) for
    D) do-while
    C) for
    (this multiple choice question has been scrambled)
  199. You are developing code for a method that calculates the discount for the items sold. You name the method CalculateDiscount. The method defines a variable, percentValue of the type double. You need to make sure that percentValue is accessible only within the CalculateDiscount method. What access modifier should you use when defining the percentValue variable?

    A) internal
    B) private
    C) protected
    D) public
    B) private
    (this multiple choice question has been scrambled)
  200. You created a class named GeoShape. You defined a method called Area in the GeoShapeclass. This method calculates the area of a geometric shape. You want the derived classes of GeoShape to supersede this functionality to support the area calculation of additional geometric shapes. When the method Area is invoked on a GeoShape object, the area should be calculated based on the runtime type of the GeoShape object. Which keyword should you use with the definition of the Area method in the GeoShape class?

    A) abstract
    B) new
    C) virtual
    D) overrides
    A) abstract
    (this multiple choice question has been scrambled)
  201. Suppose that you defined a class Scenario that defines functionality for running customized pivot transform on large data sets. You do not want the functionality of this class to be inherited into derived classes. What keyword should you use to define the Scenario class?

    A) private
    B) internal
    C) sealed
    D) abstract
    C) sealed
    (this multiple choice question has been scrambled)
  202. You need to provide printing functionality to several of your classes. Each class’s algorithm for printing will likely be different. Also, not all the classes have an “is-a” relationship with each other. How should you support this functionality?

    A) Have all the classes inherit from a base class that provides the print functionality.
    B) Add the print functionality to a base class with the public access modifier.
    C) Create a common interface that all classes implement.
    D) Have all classes inherit from an abstract base class and override the base-class method to provide their own print functionality.
    C) Create a common interface that all classes implement.
    (this multiple choice question has been scrambled)
  203. You are writing code for a class named Book. You should be able to get a list of all books sorted by the author’s last name. You need to write code to define this behavior of a class. Which of the following class elements should you use?

    A) event
    B) delegate
    C) method
    D) property
    C) method
    (this multiple choice question has been scrambled)
  204. Suppose that you are writing code for a class named Product. You need to make sure that the data members of the class are initialized to their correct values as soon as you create an object of the Product class. The initialization code should always be executed. What should you do?

    A) Create a constructor in the Product class to initialize data members.
    B) Create a static method in the Product class to initialize data members.
    C) Create a static property in the Product class to initialize data members.
    D) Create an event in the Product class to initialize data members.
    A) Create a constructor in the Product class to initialize data members.
    (this multiple choice question has been scrambled)
  205. You are writing code for a new method named Process:

    void Draw(object o){ }

    The code receives a parameter of type object. You need to cast this object into the type Polygon. At times, the value of o that is passed to the method might not be a valid Polygon value. You need to make sure that the code does not generate any System.InvalidCastException errors while doing the conversions. Which of the following lines of code should you use inside the Draw method to accomplish this goal?

    A) Polygon p = o as Polygon;
    B) Polygon p = (o != null) ? o as Polygon : (Polygon) o;
    C) Polygon p = (Polygon) o;
    D) Polygon p = o is Polygon;
    A) Polygon p = o as Polygon;

    Polygon p = (Polygon) o;
    Here, a Rectangle object is first assigned to an Object (the ultimate base class), and the resultant object is then cast back as a Rectangle. When the latter assignment happens, an explicit cast is required because you are converting a more general object to a less general object. The runtime checks whether the value of the variable o is compatible with the Rectangle class. If, at execution time, the value of o is not compatible with the Rectangle class, the runtime throws a System.InvalidCastException.

    Polygon p = o is Polygon;
    This is not a valid statement.  The is operator can be used to check if the object is question is a specific type, but it doesn't actually cast to that type.

    Polygon p = (o != null) ? o as Polygon : (Polygon) o;
    An object can't be used (as in the case of this cast) if it is null, so this code would actually throw an "Object not set to an instance of an object" exception.
    (this multiple choice question has been scrambled)
  206. You are writing code to handle events in your program. You define a delegate named PolygonHandler like this:

    public delegate void PolygonHandler(Polygon p);

    You also create a variable of the PolygonHandler type as follows:

    PolygonHandler handler;

    Later in the program, you need to add a method named CalculateArea to the method invocation list of the handler variable. The signature of the CalculateArea method matches the signature of the PolygonHandler method. Any code that you write should not affect any existing event-handling code. Given this restriction, which of the following code lines should you write?

    A) handler += CalculateArea;
    B) handler = new PolygonHandler(CalculateArea);
    C) handler = CalculateArea;
    D) handler -= CalculateArea;
    A) handler += CalculateArea;

    There are two ways to add methods to the delegate handler:

    And you can then assign the method to the delegate using the following syntax:

    handler += new PolygonHandler(CalculateArea);

    Alternatively, you can use the shortcut syntax shown below:

    handler += CalculateArea;

    Either way, think about adding (hence the '+=' rather than assigning (using the '=' sign).
    (this multiple choice question has been scrambled)
  207. You are developing a C# application. You create a class of the name Widget. You use some third-party libraries, one of which also contains a class of the name Widget. You need to make sure that using the Widget class in your code causes no ambiguity. Which C# keyword should you use to address this requirement?

    A) namespace
    B) override
    C) class
    D) delegate
    A) namespace

    When using the class, you would precede the name of the class with the namespace of the specific class that you want to make sure you are using.
    (this multiple choice question has been scrambled)
  208. You are reviewing a C# program that contains the following class:

    public class Rectangle 
    {
    public double Length {get; set;} 
    public double Width { get; set; }
    }

    The program executes the following code as part of the Main method:

    var r1 = new Rectangle { Length = 10.0, Width = 20.0 };
    var r2 = r1;
    r2.Length = 30;
    Console.WriteLine(r1.Length);
    }

    What will be the output when this code is executed?

    A) 30
    B) 40
    C) 20
    D) 10
    A) 30

    When the code var r2 = r1; is executed, the result is r2 as a pointer to the r1 object rather than creating a distinct object.  Whatever changes are made to r2 will be done to the underlying object, so any changes to r1 will also be reflected in r2.
    (this multiple choice question has been scrambled)
  209. You are developing a C# application. You need to decide whether to declare a class member as static. Which of the following statements is true about static members of a class?

    A) Only one copy of a static field is shared by all instances of a class.
    B) Static members of a class can be used only after an instance of a class is created.
    C) The static keyword is used to declare members that do not belong to individual objects but to a class itself.
    D) You can use the this keyword reference with a static method or property.
    C) The static keyword is used to declare members that do not belong to individual objects but to a class itself.

    The this keyword is used to reference an instantiated object.
    (this multiple choice question has been scrambled)
  210. Suppose that you are a new C# developer and are reviewing object-oriented programming fundamentals. Which of the following statements is not true?

    A) A class is a definition of a new data type.
    B) A constructor is used to initialize the data members of the object.
    C) A class is a concrete instance of an object.
    D) A class defines the template for an object.
    D) A class defines the template for an object.
    (this multiple choice question has been scrambled)
  211. You are C# developer who is developing a Windows application. You develop a new class that must be accessible to all the code packaged in the same assembly. Even the classes that are in the same assembly but do not directly or indirectly inherit from this class must be able to access the code. Any code outside the assembly should not be able to access the new class. Which access modifier should you use to declare the new class?

    A) protected
    B) public
    C) private
    D) internal
    D) internal
    (this multiple choice question has been scrambled)
  212. You are C# developer who is developing a Windows application. You need to provide a common definition of a base class that can be shared by multiple derived classes. Which keyword should you use to declare the new class?

    A) sealed
    B) virtual
    C) abstract
    D) interface
    B) virtual
    (this multiple choice question has been scrambled)
  213. You are C# developer who is developing a Windows application. You write the following code:

    Object o;

    Later in the code, you need to assign the value in the variable o to an object of Rectangle type. You expect that at runtime the value in the variable o is compatible with the Rectangle class. However, you need to make sure that no exceptions are raised when the value is assigned. Which of the following code should you use?

    A) Rectangle r = (Rectangle) o;
    B) Rectangle r = o as Rectangle;
    C) Rectangle r = o is Rectangle;
    D) Rectangle r = o;
    B) Rectangle r = o as Rectangle;

    The key here is that the requirement is to ensure that no exception is thrown.  There are times when you want an exception to be thrown if casting an object fails, where you would use Rectangle r = (Rectangle) o;, but this scenario requires that no exception be thrown.
    (this multiple choice question has been scrambled)
  214. You are C# developer who is developing a Windows application. You need to provide derived classes the ability to share common functionality with base classes but still define their own unique behavior. Which object-oriented programming concept should you use to accomplish this functionality?

    A) inheritance
    B) polymorphism
    C) encapsulation
    D) abstraction
    B) polymorphism
    (this multiple choice question has been scrambled)
  215. Arrange the various activities of an application lifecycle in the order in which they are likely to occur.

    A) Requirements analysis, design, coding, testing, and release
    B) Design, requirements analysis, coding, testing, and release
    C) Requirements analysis, design, release, coding, and testing
    D) Release, requirements analysis, coding, testing, and design
    A) Requirements analysis, design, coding, testing, and release
    (this multiple choice question has been scrambled)
  216. You are planning to develop a new software system for your organization. You need to review the plans, models, and architecture for how the software will be implemented. Of which of the following activities should you review the output?

    A) requirements analysis
    B) design
    C) testing
    D) coding
    B) design

    Requirements analysis is the process of determining the detailed business requirements for a new software system.

    The design process is used to create plans, models, and architecture for how the software will be implemented.

    The software development activity (called coding here) involves implementing design by creating software code, databases, and other related content.

    Software testing verifies that the implementation matches the requirements of the system.

    The release management activity is used to manage the deployment, delivery, and support of software releases.
    (this multiple choice question has been scrambled)
  217. You are planning to develop a new software system for your organization. You need to review the system’s technical blueprint. Which of the following participants is responsible for providing the technical blueprint?

    A) architect
    B) user interface designer
    C) developer
    D) technical writer
    A) architect

     An architect designs the technical blueprint of the system. This includes identifying components and services, their behavior, and how they interact with each other and with the external world.

     A user-experience designer creates the user experience of the system. This includes designing the user interface (UI) elements; designing navigation between various forms, screens, or pages; and so on.

     Developers write code based on the requirements gathered by the business analyst, the architecture laid down by the architect, and the user experience developed by the user-experience designer.

     A technical writer is a professional writer who engages in technical writing and produces technical documentation that helps people use a product or service.
    (this multiple choice question has been scrambled)
  218. You are planning to develop a new software system for your organization. Someone needs to be responsible for developing system manuals and help files. Which of the following participants should you identify for this task?

    A) technical writer
    B) user interface designer
    C) content developer
    D) user interface designer
    A) technical writer

     An architect designs the technical blueprint of the system. This includes identifying components and services, their behavior, and how they interact with each other and with the external world.

     A user-experience designer creates the user experience of the system. This includes designing the user interface (UI) elements; designing navigation between various forms, screens, or pages; and so on.

     Developers write code based on the requirements gathered by the business analyst, the architecture laid down by the architect, and the user experience developed by the user-experience designer.

     A technical writer is a professional writer who engages in technical writing and produces technical documentation that helps people use a product or service.
    (this multiple choice question has been scrambled)
  219. You are planning to develop a new software system for your organization. You need to verify that the implementation of the system matches with the requirements of the system. Which of the following activities would accomplish this requirement?

    A) requirements analysis
    B) design
    C) release
    D) testing
    D) testing

    Requirements analysis is the process of determining the detailed business requirements for a new software system.

    The design process is used to create plans, models, and architecture for how the software will be implemented.

    The software development activity (called coding here) involves implementing design by creating software code, databases, and other related content.

    Software testing verifies that the implementation matches the requirements of the system.

    The release management activity is used to manage the deployment, delivery, and support of software releases.
    (this multiple choice question has been scrambled)
  220. You are planning to develop a new software system for your organization. You need to review the plan for packaging, deployment, delivery, and support for the software. Which of the following should you contact?

    A) database administrator
    B) release manager
    C) quality assurance manager
    D) technical architect
    B) release manager
    (this multiple choice question has been scrambled)
  221. You are in the process of developing a new software application. As defects are reported,you take the necessary steps to fix them. You need to make sure that each new fix doesn’t break anything that was previously working. Which type of testing should you use?

    A) regression testing
    B) integration testing
    C) system testing
    D) acceptance testing
    A) regression testing

    Unit testing verifies the functionality of a unit of code. For example, a unit test may assess whether a method returns the correct value. Unit testing is white-box testing, and it is frequently done by the developer who is writing the code. Unit testing often uses an automated tool that can simplify the development of cases and also keep track of whether a code modification causes any of the existing unit tests to fail. Visual Studio has built-in support for unit testing. You can also use open-source tools such as NUnit to automate unit tests for the .NET Framework code.

    Integration testing assesses the interface between software components. Integration testing can be performed incrementally as the components are being developed, or it can be performed as a “big bang” when all the components are ready to work together. The former approach is preferred to the latter because it reduces risk and increases stakeholders’ confidence as the system is being developed.

    Integration testing can also involve testing the component’s interaction with an external system. For example, if a component relies on data from an external Web service, integration testing ensures that the component is working well with the external application.TAKE NOTE: It is much more cost-effective to find defects earlier rather than later in the product development cycle.

    System testing is the overall testing of the software system. At this point, all the system components are developed and are working together and with any external systems.

    Acceptance testing is often performed by the customers themselves. There are generally two levels of acceptance testing prior to broad release of a product: alpha testing and beta testing. Alpha testing is performed by a limited group of users, and it is an opportunity to provide an early look at the product to the most important customers and gather feedback. Alpha releases may miss some features and generally lack many nonfunctional attributes such as performance. In the next level of testing, beta testing, you release the product to a wider audience of customers and solicit feedback. In terms of functionality, the beta release of the software is very close to the final release. However, the development teams might still be working on improving performance and fixing known defects.

    As the defects in a software application are reported and fixed, it is important to make sure that each new fix doesn’t break anything that was previously working. This is where regression testing comes in handy. With every new fix, software testers usually run a battery of regression tests to make sure that each functionality that was already known to work correctly is still working.
    (this multiple choice question has been scrambled)
  222. You have completed developing a new software application. To ensure the quality of the software, you need to verify that each method or function has proper test cases available. Which testing approach should you use?

    A) white-box testing
    B) alpha testing
    C) beta testing
    D) black-box testing
    A) white-box testing

    Black-box testing treats the software as a black box, focusing solely on inputs and outputs. With this approach, any knowledge of internal system workings is not used during testing. Black-box testing is mostly used to make sure a software application covers all its requirements.

    With white-box testing, testers use their knowledge of system internals when testing the system. For example, in white-box testing, the testers have access to the source code. White-box testing is used to make sure that each method or function has proper test cases available.

    Alpha testing is performed by a limited group of users, and it is an opportunity to provide an early look at the product to the most important customers and gather feedback.

    Alpha releases may miss some features and generally lack many nonfunctional attributes such as performance.

    In the next level of testing, beta testing, you release the product to a wider audience of customers and solicit feedback. In terms of functionality, the beta release of the software is very close to the final release.
    (this multiple choice question has been scrambled)
  223. You have completed developing several major features of a new software application. You plan to provide an early look at the product to important customers to gather some early feedback. Your application still misses features and you haven’t yet optimized the application for performance and security. Which kind of testing should you perform with a limited number of important customers?

    A) white-box testing
    B) beta testing
    C) black-box testing
    D) alpha testing
    D) alpha testing

    Black-box testing treats the software as a black box, focusing solely on inputs and outputs. With this approach, any knowledge of internal system workings is not used during testing. Black-box testing is mostly used to make sure a software application covers all its requirements.

    White-box testing is used to make sure that each method or function has proper test cases available.  Testers use their knowledge of system internals when testing the system. For example, in white-box testing, the testers have access to the source code.

    Alpha testing is performed by a limited group of users, and it is an opportunity to provide an early look at the product to the most important customers and gather feedback.

    Alpha releases may miss some features and generally lack many nonfunctional attributes such as performance.

    In the next level of testing, beta testing, you release the product to a wider audience of customers and solicit feedback. In terms of functionality, the beta release of the software is very close to the final release.
    (this multiple choice question has been scrambled)
  224. You are developing a new application that optimizes the processing of a manufacturing plant’s operations. You need to implement a data structure that works as a “buffer” for overflow capacity. When the manufacturing capacity is available, the items in the buffer need to be processed in the order in which they were added to the buffer. Which data structure should you use to implement such buffer?

    A) linked list
    B) queue
    C) stack
    D) array
    B) queue
    (this multiple choice question has been scrambled)
  225. You are developing a new application that optimizes the processing of a warehouse’s operations. When the products arrive, they are stored on warehouse racks. To minimize the time it takes to retrieve an item, the items that arrive last are the first to go out. You need to represent the items that arrive and leave the warehouse in a data structure. Which data structure should you use to represent this situation?

    A) queue
    B) array
    C) linked list
    D) stack
    D) stack
    (this multiple choice question has been scrambled)
  226. You are developing an application that uses a double dimensional array. You use the following code to declare the array:

    int[,] numbers = new int[,] 
    { 11, 7, 50, 45, 27 }, 
    { 18, 35, 47, 24, 12 }, 
    { 89, 67, 84, 34, 24 }, 
    { 67, 32, 79, 65, 10 }

    Next, you refer to an array element by using the expression numbers[2, 3]. What will be the return value of this expression?

    A) 84
    B) 34
    C) 24
    D) 47
    B) 34

    Because arrays are always zero-base structures, the term [2,3] refers to the 3rd row, 4th column.
    (this multiple choice question has been scrambled)
  227. In your application, you are using a queue data structure to manipulate information. You need to find whether a data item exists in the queue, but you don’t want to actually process that data item yet. Which of the following queue operations will you use?

    A) dequeue
    B) contains
    C) enqueue
    D) peek
    B) contains
    (this multiple choice question has been scrambled)
  228. You are developing an application that uses the Stack data structure. You write the following code:

    Stack first = new Stack();
    first.Push(50);
    first.Push(45);
    first.Pop();
    first.Push(11);
    first.Pop();
    first.Push(7);

    What are the contents of the stack, from top to bottom, after these statements are executed?

    A) 7, 45
    B) 7, 11, 45
    C) 7, 11, 50
    D) 7, 50
    D) 7, 50

    First, we added 50 as the first value. 

    Then we pushed 45 on top of the stack (resulting in 45, 50), but then immediately popped the 45 value out, so we are still left with 50.

    Then we pushed 11 (resulting in 11, 50), but then we popped 11, so we are still left with only 50.

    Then we added 7, resulting in (from the top down) 7, 50.
    (this multiple choice question has been scrambled)
  229. In your application, you are using a stack data structure to manipulate information. You need to find which data item will be processed next, but you don’t want to actually process that data item yet. Which of the following queue operations will you use?

    A) push
    B) peek
    C) contains
    D) pop
    B) peek
    (this multiple choice question has been scrambled)
  230. You are studying various sorting algorithms to understand, analyze, and compare the various sorting techniques. Which of the following techniques should you utilize when using the BubbleSort algorithm?

    A) comparison and swap
    B) comparison
    C) comparison and partition
    D) partition and swap
    A) comparison and swap
    (this multiple choice question has been scrambled)
  231. You are developing a C# program that makes use of a singly linked list. You need to traverse all nodes of the list. Which of the following items will you need to accomplish this requirement?

    A) link to the tail node
    B) link to the head node
    C) data in the head node
    D) data in the tail node
    B) link to the head node

    Each node in a linked list contains of two pieces of information: the data corresponding to the node, and the link to the next node. The first node of the list is called the head node. Using the link in the head node, you can get to the next node and continue traversing nodes until the final link is a null value. Often, the term tail is used to refer to the list pointed to by the head node—that is, it refers to everything after the head node.
    (this multiple choice question has been scrambled)
  232. Which of the following is not true about linked lists?

    A) A linked list does not allow random access to its items.
    B) Linked lists are extremely fast in performing insert and delete operations.
    C) The items in a linked list must be stored in contiguous memory locations.
    D) A link to the head node can help you locate all the nodes in a linked list.
    C) The items in a linked list must be stored in contiguous memory locations.

    A linked list stores locations of data, not the data itself, so the data does not have to be stored in contiguous memory.
    (this multiple choice question has been scrambled)
  233. You are developing a program that performs frequent insert and delete operations on the data. Your requirement also dictates the capability to access previous and next records when the user clicks the previous or next button. Which of the following data structures will best suit your requirements?

    A) doubly linked list
    B) array
    C) circular linked list
    D) linked list
    A) doubly linked list
    (this multiple choice question has been scrambled)
  234. Your application needs to store the customer list in a text file. You want to minimize the size of this disk file and be able to open it in
    common text editors. Which of the following classes should you use to write the
    file?

    A) StreamWriter
    B) BinaryWriter
    C) StreamReader
    D) XmlWriter
    A) StreamWriter
    (this multiple choice question has been scrambled)
  235. Your C# program needs to return the total number of customers in a SQL Server database. The program will be used several times a day. What is the fastest way to return this information from your program? (Select all answers that apply.)

    A) Use the SqlCommand.ExecuteScalar method.
    B) Write a stored procedure.
    C) Use the SqlDataAdapter.Fill method.
    D) Write a SQL query.
    E) Use the OleDbDataAdapter.Fill method.
    B) Write a stored procedure.
    (this multiple choice question has been scrambled)
  236. You need to update the Products table and remove all discontinued products. When the products are discontinued, the value of the
    field Discontinued is set to true. Which of the following SQL statements should you use to make changes to the Products table?

    A) DELETE
    B) UPDATE
    C) SELECT
    D) INSERT
    B) UPDATE

    The scenario does not specify that records should be deleted, but rather just have a Discontinued flag set to true, so it requires an UPDATE rather than a DELETE statement.
    (this multiple choice question has been scrambled)
  237. You are developing an application that needs to retrieve a list of customers and their orders from a SQL Server database. After the list is retrieved, you should be able to display this data, even when a connection to the SQL Server is not available. Which of the following classes should you use to hold the data?

    A) SqlDataReader
    B) DataAdapter
    C) DataSet
    D) DataView
    C) DataSet
    (this multiple choice question has been scrambled)
  238. The application you are developing needs to write data to a flat file that include items such as a five-digit integer key, followed by a 20-character customer  name, followed by
    two date and time fields. Your solution should be as fast as possible and should create smallest size data file. Which of the following classes should you use?

    A) StreamWriter
    B) DataWriter
    C) BinaryWriter
    D) FileStream
    B) DataWriter
    (this multiple choice question has been scrambled)
  239. You are developing an application that needs to copy data from a SQL Server table to a DataSet. Which of the following methods should you use to copy the data?

    A) FillSchema
    B) Update
    C) GetFillParameters
    D) Fill
    D) Fill
    (this multiple choice question has been scrambled)
  240. You are developing an application that manages customers and their orders. Any solution that you develop must take the least amount of effort but offer the best performance. Which of the following situations is not a good candidate for implementation with stored procedures in your application?

    A) Retrieving the list of all orders for particular customers
    B) Inserting a new order into the Orders table
    C) Retrieving the list of all customers in the database
    D) Ad hoc querying by the database administrator
    D) Ad hoc querying by the database administrator
    (this multiple choice question has been scrambled)
  241. Your application includes a SqlDataAdapter
    object named sqlDataAdapter and an OleDbDataAdapter object named oledbdataAdapter. You need to connect to the Employees table of a SQL Server database. Your application also includes a DataSet object named dsEmployees. You need to load the data from the database into the DataSet object. You must select a solution that gives you the best performance. Which of the following lines of code should you choose?

    a) dsEmployees
    = sqlDataAdapter.Fill(“Employees”);
    b) dsEmployees
    = oledbDataAdapter.Fill(“Employees”);
    c) oledbDataAdapter.Fill(dsEmployees,
    "Employees");
    d) sqlDataAdapter.Fill(dsEmployees,
    “Employees”);
    d) sqlDataAdapter.Fill(dsEmployees,“Employees”);
  242. Your application includes a SqlDataAdapter
    object named sqlDataAdapter that connects to the Employees table. You use the Fill method to retrieve the data from the Employees table. The SqlDataAdapter's Connection property is set to a valid connection to the SQL Server database, but the connection is in the closed state. Which of the following statements is true about the
    working of the Fill method?

    a) The Fill method will throw an exception
    because the connection is closed.
    b) The Fill method will open the connection,
    read the data, and leave the connection open.
    c) The Fill method will open the connection,
    read the data, and leave the connection closed.
    d) The Fill method will return an empty
    result set because the connection is closed.
    d) The Fill method will return an empty result set because the connection is closed.
  243. As you design a database for your company, you review the normalization rules for the database tables. You need to ensure that your table design meets the requirements for the third normal form. Which of the following statements must be true for your tables? (Choose all that apply.)

    a) None of the columns in the table should have multiple values in the same row of data.
    b) All non-key columns are functionally dependent on the entire primary key.
    c) At least one non-key column is functionally dependent on the entire primary key.
    d) Non-key attributes don’t share any functional dependency.
    e) Non-key attributes share functional dependency.
    • b) All non-key columns are functionally dependent on the entire primary key.
    • d) Non-key attributes don’t share any functional dependency.
  244. You are designing database for a new Web application. You need to identify appropriate relational database structure to satisfy business requirements. Which of the following activities should you not perform as part of the design process?

    A) Apply the normalization process.
    B) Choose primary keys for the tables.
    C) Write stored procedures.
    D) Identify tables and columns.
    E) Identify table relationships.
    A) Apply the normalization process.
    (this multiple choice question has been scrambled)
  245. You are developing a C# program for a bike rental company. The data is stored in a SQL Server 2000 server named BikeServer in a database named BikeDB. You must use the Windows Integrated authentication to connect to the BikeDB database. Which of the following connection strings should you choose in your C# program for connecting to the BikeDB database?

    a) "Provider=SQLOLEDB;Data
    Source=BikeServer;InitialCatalog=BikeDB;Integrated Security=SSPI;"
    b) "Provider=SQLOLEDB;Data Source=BikeServer; InitialCatalog=BikeDB;User Id=sa; Password=gih6774y"
    c) "Data Source=BikeServer;InitialCatalog=BikeDB; Trusted_Connection=true;"
    d) "Data Source=BikeServer; InitialCatalog=BikeDB;User Id=sa; Password=gih6774y"
    d) "Data Source=BikeServer; InitialCatalog=BikeDB;User Id=sa; Password=gih6774y"
  246. You are developing a C# program for a bike rental company. Every night, your application needs to read data from a SQL Server 2000 database and write it to a flat file. This flat file will be transferred to your supplier. Which of the following classes shall you use to retrieve the data? Any solution that you suggest must have very little impact of the server while maximizing performance.

    A) SqlDataReader
    B) DataTable
    C) OleDbDataReader
    D) DataSet
    A) SqlDataReader
    (this multiple choice question has been scrambled)
  247. You are developing an application that stores data in SQL Server 2005 database. You need to write a query that retrieves all orders in
    the orders table that were placed on January 1, 2011. You write the following query:

    SELECT * FROM Orders WHERE OrderDate = 01/01/2011

    The statement executes without any error but does not return any data. You are certain that the database contains order from this date. How should you correct the SQL statement?

    A) SELECT * FROM Orders WHERE OrderDate = %01/01/2011%
    B) SELECT * FROM Orders WHERE OrderDate = '01/01/2011'
    C) SELECT * FROM Orders WHERE OrderDate = #01/01/2011#
    D) SELECT * FROM Orders WHERE OrderDate = "01/01/2011"
    B) SELECT * FROM Orders WHERE OrderDate = '01/01/2011'
    (this multiple choice question has been scrambled)

What would you like to do?

Home > Flashcards > Print Preview