C# Week 1

Descripción

C# Test sobre C# Week 1, creado por Eric Booker el 20/06/2019.
Eric Booker
Test por Eric Booker, actualizado hace más de 1 año
Eric Booker
Creado por Eric Booker hace más de 5 años
73
0

Resumen del Recurso

Pregunta 1

Pregunta
What is visual studio?
Respuesta
  • an IDE for .NET development
  • a collection of classes
  • a collection of class libraries and other resuable components
  • The result of program compilation

Pregunta 2

Pregunta
What is the .NET Framework
Respuesta
  • an IDE for .NET development
  • a collection of class libraries and other reusable components for application development
  • an intermediate language that C# programs compile to
  • a collection of classes that can be used by other applications

Pregunta 3

Pregunta
What is MSIL?
Respuesta
  • An intermediate language that is the result of program compilation.
  • a runtime environment that provides common services
  • a collection of classes that can be used by other applications
  • a collection of class libraries and other reusable components

Pregunta 4

Pregunta
What are some services that the CLR provides?
Respuesta
  • memory management
  • garbage collection
  • exception handling
  • syntax error handling
  • logic error handling

Pregunta 5

Pregunta
What happens after you run a program?
Respuesta
  • MSIL is converted to the Machine's native code using a compiler called Just in Time
  • CLR is converted to the Machine's native code using a compiler called Just in Time
  • JIT is converted to the Machine's native code
  • The program is converted into machine language.

Pregunta 6

Pregunta
What is an access specifier?
Respuesta
  • a keyword to specify the accessibility of a type and its members
  • a keyword to specify the access level required to edit the program
  • a keyword that places a constraint on how a class library can be used

Pregunta 7

Pregunta
The [blank_start]private[blank_end] access specifier limits the accessibility of the member to within the defined class.
Respuesta
  • private
  • public
  • protected
  • internal
  • protected internal

Pregunta 8

Pregunta
The [blank_start]public[blank_end] access specifier has no limits and any members or types defined as public can be accessed outside the class and even outside the assembly.
Respuesta
  • public
  • private
  • protected
  • internal
  • unsealed

Pregunta 9

Pregunta
[blank_start]Internal[blank_end] is used when you want your class members to be accessible within the assembly.
Respuesta
  • Internal
  • external
  • contained
  • package
  • protected

Pregunta 10

Pregunta
[blank_start]Protected[blank_end] is used only when inheritance is used. Types or members using this modifier are only accessible from a child class.
Respuesta
  • Protected
  • Interal
  • Sealed
  • Packaged
  • Contained

Pregunta 11

Pregunta
byte, int, float, char and decimal are [blank_start]value types[blank_end].
Respuesta
  • value types
  • reference types

Pregunta 12

Pregunta
Struct is a [blank_start]value type[blank_end]
Respuesta
  • value type
  • reference type

Pregunta 13

Pregunta
Enumerations are a [blank_start]value type[blank_end].
Respuesta
  • value type
  • reference type

Pregunta 14

Pregunta
Class types are [blank_start]reference types.[blank_end]
Respuesta
  • reference types.
  • value types.

Pregunta 15

Pregunta
A delegate is a reference type.
Respuesta
  • True
  • False

Pregunta 16

Pregunta
Arrays are value types.
Respuesta
  • True
  • False

Pregunta 17

Pregunta
The default value of bool is [blank_start]false.[blank_end]
Respuesta
  • false.
  • true.

Pregunta 18

Pregunta
the default value of int is [blank_start]0[blank_end]
Respuesta
  • 0
  • 1

Pregunta 19

Pregunta
The resources within your application are called [blank_start]managed code[blank_end]
Respuesta
  • managed code
  • unmanaged code
  • packaged code
  • maintained code

Pregunta 20

Pregunta
Managed code is directly executed by the MSIL.
Respuesta
  • True
  • False

Pregunta 21

Pregunta
Any code developed in the .NET framework is managed code.
Respuesta
  • True
  • False

Pregunta 22

Pregunta
Any code developed outside the .NET framework is known as [blank_start]unmanaged code[blank_end]
Respuesta
  • unmanaged code
  • managed code
  • ethereal code
  • unpackaged code

Pregunta 23

Pregunta
FInalizers can be defined in structs.
Respuesta
  • True
  • False

Pregunta 24

Pregunta
A class can only have one finalizer.
Respuesta
  • True
  • False

Pregunta 25

Pregunta
Finalizers can be inherited and overloaded
Respuesta
  • True
  • False

Pregunta 26

Pregunta
Finalizers cannot be called. They are invoked automatically.
Respuesta
  • True
  • False

Pregunta 27

Pregunta
A finalizer can take modifiers and parameters.
Respuesta
  • True
  • False

Pregunta 28

Pregunta
When should you use finalizers?
Respuesta
  • Releasing un-managed resources
  • Releasing all resources
  • To finalize the declaration of every class

Pregunta 29

Pregunta
The [blank_start]common language runtime[blank_end] is in charge of managed code.
Respuesta
  • common language runtime
  • microsoft intermediate language
  • just in time compiler
  • machine language

Pregunta 30

Pregunta
When you compile a C#, Visual Basic, or F#, your output will be [blank_start]Intermediate Language[blank_end] code.
Respuesta
  • Intermediate Language
  • Machine
  • CLR
  • byte

Pregunta 31

Pregunta
When you want to run code in intermediate language form, the CLR will take over and start the process of [blank_start]just in time[blank_end] compiling.
Respuesta
  • just in time
  • intermediate level
  • direct
  • standard

Pregunta 32

Pregunta
A child class extending the parent class is an example of inheritance
Respuesta
  • True
  • False

Pregunta 33

Pregunta
C# supports multiple inheritance.
Respuesta
  • True
  • False

Pregunta 34

Pregunta
The [blank_start]virtual[blank_end] keyword is used to modify a method, property, indexer, or event declaration and allows it to be overridden in a derived class.
Respuesta
  • virtual
  • protected
  • unsealed
  • public

Pregunta 35

Pregunta
The [blank_start]override[blank_end] modifier is required to extend or modify an abstract or virtual implementation.
Respuesta
  • override
  • @override
  • inherit
  • extend

Pregunta 36

Pregunta
Overriding is a type of polymorphism.
Respuesta
  • True
  • False

Pregunta 37

Pregunta
You can override a non-virtual or static method.
Respuesta
  • True
  • False

Pregunta 38

Pregunta
A lambda expression is a block of code that is treated as [blank_start]________[blank_end]
Respuesta
  • an object
  • a method
  • a function
  • a struct

Pregunta 39

Pregunta
Lambda expressions can be represented as a delegate.
Respuesta
  • True
  • False

Pregunta 40

Pregunta
x = > x * x The left side of the lambda expression takes [blank_start]input parameters[blank_end] and the right side contains the [blank_start]expression.[blank_end]
Respuesta
  • input parameters
  • variable
  • expression
  • constant
  • method declaration
  • expression

Pregunta 41

Pregunta
A delegate is
Respuesta
  • a type that represents references to methods with a particular parameter list and return type
  • a type that can store any method
  • is used only in asynchronous programming
  • is the same as a callback in JavaScript

Pregunta 42

Pregunta
Delegates are used to pass methods as arguments to other methods.
Respuesta
  • True
  • False

Pregunta 43

Pregunta
Delegates allow [blank_start]methods[blank_end] to be passed as parameters.
Respuesta
  • methods
  • objects
  • structs
  • anything

Pregunta 44

Pregunta
Delegates cannot be used to define callback methods.
Respuesta
  • True
  • False

Pregunta 45

Pregunta
Delegates can be chained together.
Respuesta
  • True
  • False

Pregunta 46

Pregunta
Members marked as abstract must be implemented by classes that derive from the abstract class.
Respuesta
  • True
  • False

Pregunta 47

Pregunta
An interface cannot have access specifiers for functions. It is public by default.
Respuesta
  • True
  • False

Pregunta 48

Pregunta
An abstract class can have an access specifier for its functions.
Respuesta
  • True
  • False

Pregunta 49

Pregunta
An interface can provide complete implementation and not just method signatures.
Respuesta
  • True
  • False

Pregunta 50

Pregunta
Neither an interface not an abstract class can be instantiated.
Respuesta
  • True
  • False

Pregunta 51

Pregunta
An [blank_start]interface[blank_end] cannot have fields. An [blank_start]abstract class[blank_end] can have defined fields and constants.
Respuesta
  • interface
  • abstract class
  • abstract class
  • interface

Pregunta 52

Pregunta
An [blank_start]interface[blank_end] can only have abstract methods whereas an [blank_start]abstract class[blank_end] can have non-abstract methods.
Respuesta
  • interface
  • abstract class
  • abstract class
  • interface

Pregunta 53

Pregunta
A class can [blank_start]inherit one or more interfaces[blank_end] and only [blank_start]only one abstract class.[blank_end]
Respuesta
  • inherit one or more interfaces
  • inherit only one interfaces
  • a maximum of 2 interfaces
  • only one abstract class.
  • exactly two abstract classes
  • one or more abstract classes

Pregunta 54

Pregunta
An interface [blank_start]cannot[blank_end] have a constructor declaration
Respuesta
  • cannot
  • must
  • can

Pregunta 55

Pregunta
An abstract class [blank_start]can[blank_end] have the constructor declaration.
Respuesta
  • can
  • cannot
  • must

Pregunta 56

Pregunta
The applied to a class, the sealed modifier prevents other classes from inheriting it.
Respuesta
  • True
  • False

Pregunta 57

Pregunta
Use the abstract modifier in a class declaration to indicate that a class is intended only to be a base class of other classes, not instantiated on its own.
Respuesta
  • True
  • False

Pregunta 58

Pregunta
A struct type is a value type that is typically used to encapsulate small groups of related variables
Respuesta
  • True
  • False

Pregunta 59

Pregunta
A struct can be instantiated.
Respuesta
  • True
  • False

Pregunta 60

Pregunta
A struct can be inherited.
Respuesta
  • True
  • False

Pregunta 61

Pregunta
Structs can be instantiated without using the [blank_start]new[blank_end] keyword.
Respuesta
  • new
  • this
  • of
  • instantiate

Pregunta 62

Pregunta
This represents a valid struct instantiation.
Respuesta
  • True
  • False

Pregunta 63

Pregunta
The [blank_start]in[blank_end] keyword is used to pass by reference by it's arguments cannot be modified by the called method. The [blank_start]out[blank_end] keyword's arguments must be modified by the called method. The [blank_start]ref[blank_end] keyword's arguments MAY be modified.
Respuesta
  • in
  • out
  • ref
  • out
  • in
  • ref
  • ref
  • out
  • in

Pregunta 64

Pregunta
An argument that is passed to ref or in must be initialized before it is passed.
Respuesta
  • True
  • False

Pregunta 65

Pregunta
Out parameters do not require initialized arguments to be passed.
Respuesta
  • True
  • False

Pregunta 66

Pregunta
In arguments cannot be modified by the called method.
Respuesta
  • True
  • False

Pregunta 67

Pregunta
[blank_start]ref[blank_end] tells the compiler that the object is initialized before entering the function.
Respuesta
  • ref
  • in
  • out

Pregunta 68

Pregunta
[blank_start]out[blank_end] tells the compiler the compiler that the object will be initialized inside the function.
Respuesta
  • out
  • in
  • ref

Pregunta 69

Pregunta
With [blank_start]out[blank_end], it is necessary to initialize the value of a parameter before returning to the calling method.
Respuesta
  • out
  • in
  • ref

Pregunta 70

Pregunta
The passing of a value through the [blank_start]ref[blank_end] parameter is useful when the called method also needs to change the value of the passed parameter.
Respuesta
  • ref
  • in
  • out

Pregunta 71

Pregunta
The declaring of a parameter with the [blank_start]out[blank_end] keyword is useful when a method returns multiple values.
Respuesta
  • out
  • in
  • ref

Pregunta 72

Pregunta
When the [blank_start]out[blank_end] keyword is use, the data passed is one-way.
Respuesta
  • out
  • ref
  • in

Pregunta 73

Pregunta
When the [blank_start]ref[blank_end] keyword is used, the data may pass bidirectionally.
Respuesta
  • ref
  • out
  • in

Pregunta 74

Pregunta
Delegates can be used in implementing call-back methods or events.
Respuesta
  • True
  • False

Pregunta 75

Pregunta
A [blank_start]delegate[blank_end] is an [blank_start]object[blank_end] that refers to a [blank_start]method[blank_end].
Respuesta
  • delegate
  • namespace
  • callback
  • Enumerator
  • object
  • method
  • method
  • object

Pregunta 76

Pregunta
A function must be declared as a delegate before it's passed to another function.
Respuesta
  • True
  • False

Pregunta 77

Pregunta
[blank_start]Multicasting[blank_end] of a delegate allows a user to point to more than one method in a single call.
Respuesta
  • Multicasting
  • Typecasting
  • Variedcasting
  • Casting

Pregunta 78

Pregunta
An action delegate saves you from defining a custom delegate
Respuesta
  • True
  • False

Pregunta 79

Pregunta
Serialization is the process of converting an object into a stream of bytes.
Respuesta
  • True
  • False

Pregunta 80

Pregunta
Serialization allows the developer to save the [blank_start]state[blank_end] of an object and recreate it when needed.
Respuesta
  • state
  • type
  • class

Pregunta 81

Pregunta
To serialize an object in C#, you need the object to be serialized and, the stream to contain the serialized object, and a [blank_start]formatter.[blank_end]
Respuesta
  • formatter.
  • encapsulator
  • template
  • box

Pregunta 82

Pregunta
What is the namespace necessary to use serialization?
Respuesta
  • System.Runtime.Serialization
  • System.Serialization
  • System.Encapsulation.Serialization
  • System.Serializer

Pregunta 83

Pregunta
It is not necessary to apply the SerializableAttribute attribute to an object before serializing it.
Respuesta
  • True
  • False

Pregunta 84

Pregunta
The two type of serialization are:
Respuesta
  • binary and xml
  • binary and string
  • string and xml
  • serializable and binary

Pregunta 85

Pregunta
A [blank_start]dynamic link library[blank_end] is a library that contains functions and code that can be used by more than one program at a time.
Respuesta
  • dynamic link library
  • direct link library
  • class
  • namespace

Pregunta 86

Pregunta
When building a class library, you are building an assembly which contains DLLs.
Respuesta
  • True
  • False

Pregunta 87

Pregunta
The [blank_start]StringBuilder[blank_end] class represents a mutable string of characters.
Respuesta
  • StringBuilder
  • Builder
  • String
  • CharArray

Pregunta 88

Pregunta
A [blank_start]partial class[blank_end] is used when a class definition is very large and not everything can be reasonably stored in a single class file.
Respuesta
  • partial class
  • child class
  • extended class
  • sibling class

Pregunta 89

Pregunta
[blank_start]Enum[blank_end] is used to declare a list of named integer constants.
Respuesta
  • Enum
  • struct
  • IEnumerable
  • IntGroup

Pregunta 90

Pregunta
You can assign a null to int.
Respuesta
  • True
  • False

Pregunta 91

Pregunta
a [blank_start]constant[blank_end] is defined at the time of declaration and cannot be changed whereas a a [blank_start]readonly[blank_end] field can be changed at runtime inside a non-static constructor.
Respuesta
  • constant
  • readonly
  • readonly
  • constant

Pregunta 92

Pregunta
Every class in C# is derived from the base class named Object.
Respuesta
  • True
  • False

Pregunta 93

Pregunta
C#' s strong typing resolves at runtime.
Respuesta
  • True
  • False

Pregunta 94

Pregunta
An explicit conversion should be done when there is a risk that an implicit conversion would lost information.
Respuesta
  • True
  • False

Pregunta 95

Pregunta
Unit testing is done by both developer and testers.
Respuesta
  • True
  • False

Pregunta 96

Pregunta
The [blank_start]arrange[blank_end] section of a unit test method initializes objects and sets the value of the data that is passed to the method under test.
Respuesta
  • arrange
  • act
  • assert

Pregunta 97

Pregunta
The [blank_start]act[blank_end] section of unit testing invokes the method under test with the arranged parameters.
Respuesta
  • act
  • assert
  • arrange

Pregunta 98

Pregunta
The [blank_start]assert[blank_end] section of a unit test verifies that the action of the method under test behaves as expected.
Respuesta
  • assert
  • arrange
  • act

Pregunta 99

Pregunta
The [blank_start]is[blank_end] operator is used to check if the run-time type of an object is compatible with the given type or not whereas [blank_start]as[blank_end] operator is used to perform conversion between compatible reference types or Nullable types.
Respuesta
  • is
  • as
  • as
  • is

Pregunta 100

Pregunta
The keyword [blank_start]volatile[blank_end] ensures that all threads operating on an object will receive the latest value of the object when they receive it.
Respuesta
  • volatile
  • variable
  • changeable
  • recent

Pregunta 101

Pregunta
Which of the following are generic types?
Respuesta
  • List
  • Dictionary
  • Hashset
  • ArrayList
  • BitArray

Pregunta 102

Pregunta
Which of the following are non-generic types?
Respuesta
  • ArrayList
  • BitArray
  • List
  • Dictionary
  • Hashset

Pregunta 103

Pregunta
Generic collections hold elements of the same datatype.
Respuesta
  • True
  • False

Pregunta 104

Pregunta
Non-generic collections hold elements of the same datatype.
Respuesta
  • True
  • False

Pregunta 105

Pregunta
There are 3 types of collections in C#.
Respuesta
  • True
  • False

Pregunta 106

Pregunta
The process of converting a value type to a reference type is called [blank_start]boxing.[blank_end]
Respuesta
  • boxing

Pregunta 107

Pregunta
A [blank_start]value type[blank_end] stores the value in its memory space whereas a [blank_start]reference type[blank_end] stores the address of the value.
Respuesta
  • value type
  • reference type
  • reference type
  • value type

Pregunta 108

Pregunta
The namespace for generics is
Respuesta
  • system.collections.generic
  • system.collections
  • system.generic

Pregunta 109

Pregunta
int[1, 2, 3,] marks; is the correct way to declare an integer array
Respuesta
  • True
  • False

Pregunta 110

Pregunta
int[] marks = new int[10] is will declare an integer array that can hold 10 values.
Respuesta
  • True
  • False

Pregunta 111

Pregunta
IEnumerable<T> is an interface which supports iteration of a collection of a [blank_start]specified type.[blank_end]
Respuesta
  • specified type.
  • unspecified type

Pregunta 112

Pregunta
IEnumerable<T> is an interface that defines methods to manipulate generic collections.
Respuesta
  • True
  • False

Pregunta 113

Pregunta
If using multiple catch blocks, the most specific exception should be caught first.
Respuesta
  • True
  • False

Pregunta 114

Pregunta
[blank_start]LINQ[blank_end] is the name for a set of technologies that integrates query capabilities directly into the C# langauge.
Respuesta
  • LINQ
  • Q.U.E.R.Y.
  • LINK
  • LINKED

Pregunta 115

Pregunta
A destructor for an object can be declared by placing a _____ in front of the destructor name
Respuesta
  • ~
  • `
  • -
  • +

Pregunta 116

Pregunta
SOLID stands for Single Responsibility Principle, Open closed Principle, Liskov substitution Principle, Interface Segregation Principle, Dependency Integration Principle
Respuesta
  • True
  • False

Pregunta 117

Pregunta
A private constructor is used to ensure that a class [blank_start]_____[blank_end]
Respuesta
  • cannot be instantiated
  • must be instantiated
  • may be instantiated

Pregunta 118

Pregunta
The Single Responsibility Principle states that a class [blank_start]____________[blank_end]
Respuesta
  • should only have one purpose
  • needs methods that perform one task
  • should only have one method
  • should only have one constructor

Pregunta 119

Pregunta
The Open-Closed Principle states that a Software Entity should be open for [blank_start]extension[blank_end] but closed to [blank_start]modification[blank_end].
Respuesta
  • extension
  • modification
  • modification
  • extension

Pregunta 120

Pregunta
The Liskov substitution principle states that given a specific base class, any class that inherits from it can be a substitute for the base class.
Respuesta
  • True
  • False

Pregunta 121

Pregunta
The Interface Segregation Principle suggests that [blank_start]having many specific interfaces[blank_end] is the best design.
Respuesta
  • having many specific interfaces
  • having one large interface
  • having many abstract classes
  • having many different classes

Pregunta 122

Pregunta
The [blank_start]Dependency Inversion Principle[blank_end] states that code should depend upon abstractions, not concrete implementations.
Respuesta
  • Dependency Inversion Principle
  • Single Responsibility Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Open-Closed Principle

Pregunta 123

Pregunta
A class should inherit everything from its base class and, if necessary, override any of those inherited methods if something needs to be changed. This is an example of _________.
Respuesta
  • Open-Closed Principle
  • Single Responsibility Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion Principle

Pregunta 124

Pregunta
What does REST stand for?
Respuesta
  • Representational State Transfer
  • Resolved State Transfer
  • Representational Status Transfer
  • Representational State Transmission

Pregunta 125

Pregunta
REST is loosely coupled.
Respuesta
  • True
  • False

Pregunta 126

Pregunta
REST is stateless.
Respuesta
  • True
  • False

Pregunta 127

Pregunta
REST can deliver data in multiple formats such as HTML, XML, JSON, YAML, etc.
Respuesta
  • True
  • False

Pregunta 128

Pregunta
What does SOAP stand for?
Respuesta
  • Simple Object Access Protocol
  • Standard Object Access Protocol
  • Simple Object Abstraction Protocol
  • Simple Object Access Program

Pregunta 129

Pregunta
SOAP can return data in many formats such as XML, JSON, or HTML.
Respuesta
  • True
  • False

Pregunta 130

Pregunta
Which of the following are components of a SOAP message?
Respuesta
  • Envelope
  • Header
  • Body
  • Fault
  • Message
  • Metadata

Pregunta 131

Pregunta
[blank_start]SOAP[blank_end] is a standardized protocol with pre-defined rules to follow.
Respuesta
  • SOAP
  • REST

Pregunta 132

Pregunta
[blank_start]REST[blank_end] is an architectural style with loose guideline recommendations.
Respuesta
  • REST
  • SOAP

Pregunta 133

Pregunta
[blank_start]SOAP[blank_end] can be stateful or stateless and [blank_start]REST[blank_end] is stateless.
Respuesta
  • SOAP
  • REST
  • REST
  • SOAP

Pregunta 134

Pregunta
[blank_start]SOAP[blank_end] is more secure than [blank_start]REST[blank_end].
Respuesta
  • SOAP
  • REST
  • REST
  • SOAP

Pregunta 135

Pregunta
REST would be more appropriate for enterprise environments.
Respuesta
  • True
  • False

Pregunta 136

Pregunta
[blank_start]Action[blank_end] delegates take no parameters and return nothing (they are void). [blank_start]Func[blank_end] delegates should be used if you are expecting return values. [blank_start]Predicate[blank_end] functions are a delegate or anonymous function which returns a boolean.
Respuesta
  • Action
  • Func
  • Predicate
  • Func
  • Action
  • Predicate
  • Predicate
  • Action
  • Func

Pregunta 137

Pregunta
A Tuple is a structure that contains a sequence of elements of different data types that can be used if you need to store an object with properties but don't want to create a separate type for it.
Respuesta
  • True
  • False

Pregunta 138

Pregunta
A Tuple can hold a maximum of [blank_start]8[blank_end] elements
Respuesta
  • 8
  • 7
  • 4
  • 5
  • 6
  • 10

Pregunta 139

Pregunta
A nested class can be instantiated separately from its parent class.
Respuesta
  • True
  • False

Pregunta 140

Pregunta
A nested class can be declared private such that it can only be seen by its parent class and other nested classes of the parents.
Respuesta
  • True
  • False

Pregunta 141

Pregunta
A stack has an [blank_start]add[blank_end] and get method.
Respuesta
  • add

Pregunta 142

Pregunta
A stack is First In Last Out
Respuesta
  • True
  • False

Pregunta 143

Pregunta
A Queue is First In First Out.
Respuesta
  • True
  • False
Mostrar resumen completo Ocultar resumen completo

Similar

Programming in C# Exam 70-483 Q&A
Richard Brown
Programming Goals: Creating a Learning Map for C#
Garrett Fortner
C# - Test Drive...!!
Prashant Singh R
C# Fundamentals
Robert Mulpeter
Introduction to Programming: C#
Isaiah Parker
Programming in C#: Exam 483
R M
C# Code Analysis Engine Developer - Can you do my job?
Hugh Wood
.NET midterm question
BigDady313 .