C# Week 1

Beschreibung

C# Quiz am C# Week 1, erstellt von Eric Booker am 20/06/2019.
Eric Booker
Quiz von Eric Booker, aktualisiert more than 1 year ago
Eric Booker
Erstellt von Eric Booker vor mehr als 5 Jahre
73
0

Zusammenfassung der Ressource

Frage 1

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

Frage 2

Frage
What is the .NET Framework
Antworten
  • 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

Frage 3

Frage
What is MSIL?
Antworten
  • 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

Frage 4

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

Frage 5

Frage
What happens after you run a program?
Antworten
  • 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.

Frage 6

Frage
What is an access specifier?
Antworten
  • 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

Frage 7

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

Frage 8

Frage
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.
Antworten
  • public
  • private
  • protected
  • internal
  • unsealed

Frage 9

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

Frage 10

Frage
[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.
Antworten
  • Protected
  • Interal
  • Sealed
  • Packaged
  • Contained

Frage 11

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

Frage 12

Frage
Struct is a [blank_start]value type[blank_end]
Antworten
  • value type
  • reference type

Frage 13

Frage
Enumerations are a [blank_start]value type[blank_end].
Antworten
  • value type
  • reference type

Frage 14

Frage
Class types are [blank_start]reference types.[blank_end]
Antworten
  • reference types.
  • value types.

Frage 15

Frage
A delegate is a reference type.
Antworten
  • True
  • False

Frage 16

Frage
Arrays are value types.
Antworten
  • True
  • False

Frage 17

Frage
The default value of bool is [blank_start]false.[blank_end]
Antworten
  • false.
  • true.

Frage 18

Frage
the default value of int is [blank_start]0[blank_end]
Antworten
  • 0
  • 1

Frage 19

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

Frage 20

Frage
Managed code is directly executed by the MSIL.
Antworten
  • True
  • False

Frage 21

Frage
Any code developed in the .NET framework is managed code.
Antworten
  • True
  • False

Frage 22

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

Frage 23

Frage
FInalizers can be defined in structs.
Antworten
  • True
  • False

Frage 24

Frage
A class can only have one finalizer.
Antworten
  • True
  • False

Frage 25

Frage
Finalizers can be inherited and overloaded
Antworten
  • True
  • False

Frage 26

Frage
Finalizers cannot be called. They are invoked automatically.
Antworten
  • True
  • False

Frage 27

Frage
A finalizer can take modifiers and parameters.
Antworten
  • True
  • False

Frage 28

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

Frage 29

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

Frage 30

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

Frage 31

Frage
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.
Antworten
  • just in time
  • intermediate level
  • direct
  • standard

Frage 32

Frage
A child class extending the parent class is an example of inheritance
Antworten
  • True
  • False

Frage 33

Frage
C# supports multiple inheritance.
Antworten
  • True
  • False

Frage 34

Frage
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.
Antworten
  • virtual
  • protected
  • unsealed
  • public

Frage 35

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

Frage 36

Frage
Overriding is a type of polymorphism.
Antworten
  • True
  • False

Frage 37

Frage
You can override a non-virtual or static method.
Antworten
  • True
  • False

Frage 38

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

Frage 39

Frage
Lambda expressions can be represented as a delegate.
Antworten
  • True
  • False

Frage 40

Frage
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]
Antworten
  • input parameters
  • variable
  • expression
  • constant
  • method declaration
  • expression

Frage 41

Frage
A delegate is
Antworten
  • 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

Frage 42

Frage
Delegates are used to pass methods as arguments to other methods.
Antworten
  • True
  • False

Frage 43

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

Frage 44

Frage
Delegates cannot be used to define callback methods.
Antworten
  • True
  • False

Frage 45

Frage
Delegates can be chained together.
Antworten
  • True
  • False

Frage 46

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

Frage 47

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

Frage 48

Frage
An abstract class can have an access specifier for its functions.
Antworten
  • True
  • False

Frage 49

Frage
An interface can provide complete implementation and not just method signatures.
Antworten
  • True
  • False

Frage 50

Frage
Neither an interface not an abstract class can be instantiated.
Antworten
  • True
  • False

Frage 51

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

Frage 52

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

Frage 53

Frage
A class can [blank_start]inherit one or more interfaces[blank_end] and only [blank_start]only one abstract class.[blank_end]
Antworten
  • 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

Frage 54

Frage
An interface [blank_start]cannot[blank_end] have a constructor declaration
Antworten
  • cannot
  • must
  • can

Frage 55

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

Frage 56

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

Frage 57

Frage
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.
Antworten
  • True
  • False

Frage 58

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

Frage 59

Frage
A struct can be instantiated.
Antworten
  • True
  • False

Frage 60

Frage
A struct can be inherited.
Antworten
  • True
  • False

Frage 61

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

Frage 62

Frage
This represents a valid struct instantiation.
Antworten
  • True
  • False

Frage 63

Frage
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.
Antworten
  • in
  • out
  • ref
  • out
  • in
  • ref
  • ref
  • out
  • in

Frage 64

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

Frage 65

Frage
Out parameters do not require initialized arguments to be passed.
Antworten
  • True
  • False

Frage 66

Frage
In arguments cannot be modified by the called method.
Antworten
  • True
  • False

Frage 67

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

Frage 68

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

Frage 69

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

Frage 70

Frage
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.
Antworten
  • ref
  • in
  • out

Frage 71

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

Frage 72

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

Frage 73

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

Frage 74

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

Frage 75

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

Frage 76

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

Frage 77

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

Frage 78

Frage
An action delegate saves you from defining a custom delegate
Antworten
  • True
  • False

Frage 79

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

Frage 80

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

Frage 81

Frage
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]
Antworten
  • formatter.
  • encapsulator
  • template
  • box

Frage 82

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

Frage 83

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

Frage 84

Frage
The two type of serialization are:
Antworten
  • binary and xml
  • binary and string
  • string and xml
  • serializable and binary

Frage 85

Frage
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.
Antworten
  • dynamic link library
  • direct link library
  • class
  • namespace

Frage 86

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

Frage 87

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

Frage 88

Frage
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.
Antworten
  • partial class
  • child class
  • extended class
  • sibling class

Frage 89

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

Frage 90

Frage
You can assign a null to int.
Antworten
  • True
  • False

Frage 91

Frage
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.
Antworten
  • constant
  • readonly
  • readonly
  • constant

Frage 92

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

Frage 93

Frage
C#' s strong typing resolves at runtime.
Antworten
  • True
  • False

Frage 94

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

Frage 95

Frage
Unit testing is done by both developer and testers.
Antworten
  • True
  • False

Frage 96

Frage
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.
Antworten
  • arrange
  • act
  • assert

Frage 97

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

Frage 98

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

Frage 99

Frage
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.
Antworten
  • is
  • as
  • as
  • is

Frage 100

Frage
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.
Antworten
  • volatile
  • variable
  • changeable
  • recent

Frage 101

Frage
Which of the following are generic types?
Antworten
  • List
  • Dictionary
  • Hashset
  • ArrayList
  • BitArray

Frage 102

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

Frage 103

Frage
Generic collections hold elements of the same datatype.
Antworten
  • True
  • False

Frage 104

Frage
Non-generic collections hold elements of the same datatype.
Antworten
  • True
  • False

Frage 105

Frage
There are 3 types of collections in C#.
Antworten
  • True
  • False

Frage 106

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

Frage 107

Frage
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.
Antworten
  • value type
  • reference type
  • reference type
  • value type

Frage 108

Frage
The namespace for generics is
Antworten
  • system.collections.generic
  • system.collections
  • system.generic

Frage 109

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

Frage 110

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

Frage 111

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

Frage 112

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

Frage 113

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

Frage 114

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

Frage 115

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

Frage 116

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

Frage 117

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

Frage 118

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

Frage 119

Frage
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].
Antworten
  • extension
  • modification
  • modification
  • extension

Frage 120

Frage
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.
Antworten
  • True
  • False

Frage 121

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

Frage 122

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

Frage 123

Frage
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 _________.
Antworten
  • Open-Closed Principle
  • Single Responsibility Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion Principle

Frage 124

Frage
What does REST stand for?
Antworten
  • Representational State Transfer
  • Resolved State Transfer
  • Representational Status Transfer
  • Representational State Transmission

Frage 125

Frage
REST is loosely coupled.
Antworten
  • True
  • False

Frage 126

Frage
REST is stateless.
Antworten
  • True
  • False

Frage 127

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

Frage 128

Frage
What does SOAP stand for?
Antworten
  • Simple Object Access Protocol
  • Standard Object Access Protocol
  • Simple Object Abstraction Protocol
  • Simple Object Access Program

Frage 129

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

Frage 130

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

Frage 131

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

Frage 132

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

Frage 133

Frage
[blank_start]SOAP[blank_end] can be stateful or stateless and [blank_start]REST[blank_end] is stateless.
Antworten
  • SOAP
  • REST
  • REST
  • SOAP

Frage 134

Frage
[blank_start]SOAP[blank_end] is more secure than [blank_start]REST[blank_end].
Antworten
  • SOAP
  • REST
  • REST
  • SOAP

Frage 135

Frage
REST would be more appropriate for enterprise environments.
Antworten
  • True
  • False

Frage 136

Frage
[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.
Antworten
  • Action
  • Func
  • Predicate
  • Func
  • Action
  • Predicate
  • Predicate
  • Action
  • Func

Frage 137

Frage
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.
Antworten
  • True
  • False

Frage 138

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

Frage 139

Frage
A nested class can be instantiated separately from its parent class.
Antworten
  • True
  • False

Frage 140

Frage
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.
Antworten
  • True
  • False

Frage 141

Frage
A stack has an [blank_start]add[blank_end] and get method.
Antworten
  • add

Frage 142

Frage
A stack is First In Last Out
Antworten
  • True
  • False

Frage 143

Frage
A Queue is First In First Out.
Antworten
  • True
  • False
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

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 .