Quiz
Programming 3 revision
Dieses Quiz enthält Fragetypen, die sich im gewohnten Player öffnen.
Fragen in diesem Quiz (13)
1What is .NET?
Not an [blank_start]operating[blank_end] system
An environment in which programs [blank_start]run[blank_end]
Resides at a [blank_start]layer[blank_end] between operating system and other applications
“Runtime and a library for writing and executing programs written in any [blank_start]compliant[blank_end] language”- Aoperating
- Brun
- Clayer
- Dcompliant
2Main components in .NET
[blank_start]Common[blank_end] Language Runtime (CLR): the execution engine that handles running applications, providing core services such as
[blank_start]Memory[blank_end] management
[blank_start]Security[blank_end]
[blank_start]Exception[blank_end] handling
[blank_start]Garbage[blank_end] collection (GC)
[blank_start]Framework[blank_end] Class Library (FCL): a collection of reusable types that tightly integrate with the CLR
Organized in namespace
Language [blank_start]neutrality[blank_end]- ACommon
- BMemory
- CSecurity
- DException
- EGarbage
- FFramework
- Gneutrality
3Just-in-time compilation
Just-in-time compilation (JIT) is compilation done during [blank_start]execution[blank_end] of a program at [blank_start]run[blank_end] time rather than prior to execution.
Java
JVM: from [blank_start]ByteCode[blank_end] to machine code
C#
CLR: from [blank_start]Intermediate[blank_end] Language to machine code- Aexecution
- Brun
- CByteCode
- DIntermediate
4Catchwords
[blank_start].NET[blank_end]
nN specific meaning, emphasise the "Network"-ing aspect of its technologies (perhaps)
[blank_start]Common Language Specification (CLS)[blank_end]
Specifies similar behaviour in .NET languages e.g. parameter passing, argument evaluation, exception handling…
[blank_start]Common Type System(CTS)[blank_end]
Guarantees loss-free data exchange between .NET languages, Defines rules concerning data types
[blank_start]Common Intermediate Language (IL)[blank_end]
Facilitate the use of code that is more platform independent
[blank_start]Common Language Runtime (CLR)[blank_end]
Executes CIL , JIT compiler is the integral part of CLR.
[blank_start]Framework Class Library(FCL)[blank_end]
A library of more than 2000 classes, interfaces, and value types that are included in the Microsoft .NET Framework SDK- A.NET
- BCommon Language Specification (CLS)
- CCommon Type System(CTS)
- DCommon Intermediate Language (IL)
- ECommon Language Runtime (CLR)
- FFramework Class Library(FCL)
5Which of the following components of the .NET framework provide an extensible set of classes that can be used by any .NET compliant programming language?
- A.NET class libraries
- BCommon Language Runtime
- CCommon Language Infrastructure
- DCommon Type System
6Which of the following are parts of the .NET Framework?
- AThe Common Language Runtime (CLR)
- BThe Framework Class Libraries (FCL)
- CMicrosoft Published Web Services
- DApplications deployed on IIS
- EThe Common Language Runtime (CLR) & The Framework Class Libraries (FCL)
7What is C#?
C# is a language designed from scratch by [blank_start]Microsoft[blank_end] to work with .NET.
Taking advantage of what has been learned from VB, C++ and Java.
Has the rapid GUI features of [blank_start]VB[blank_end]
Has the added power of [blank_start]C++[blank_end]
Has the [blank_start]object-oriented[blank_end] class libraries similar to Java- AMicrosoft
- BVB
- CC++
- Dobject-oriented
8namespace
C# uses the concept of namespaces to group logically related classes through the [blank_start]namespace[blank_end] keyword. These act similarly to Java packages
You can use a namespace to organize code [blank_start]elements[blank_end] and to create globally unique types.
They are delimited by using the [blank_start].[blank_end] Operator
In C#, the folder structure has no bearing on the namespace.
If a namespace is present in a library what is the correct way to use the elements of the namespace?
Adding Reference of the namespace, importing the namespace, and using the elements of the namespace.- Anamespace
- Belements
- C.
9Which of the following statements is correct about a namespace used in C#.NET?
- ANested namespaces are not allowed.
- BEvery class, struct, enum, delegate and interlace has to belong to some or the other namespace.
- CAll elements of the namespace have to belong to one file.
- DIf not mentioned, a namespace takes the name of the current project.
- Eusing statement can be placed anywhere in the C#.NET source code file.
- FA C#.NET source code file can contain any number of using statement.
10Which of the following is absolutely necessary to use a class Point present in namespace Graph stored in library?
- A. Use fully qualified name of the Point class.
- BUse using statement before using the Point class.
- CAdd Reference of the namespace before using the Point class.
- DCopy the library into the current project directory before using the Point class.
11C# Keywords and identifiers
Keywords are [blank_start]predefined[blank_end], reserved identifiers that have special meanings to the [blank_start]compiler[blank_end].
They cannot be used as identifiers in your program unless they include @ as a prefix.
An [blank_start]identifier[blank_end] is a name used to identify a class, variable, method, or any other user-defined item:
A name must begin with a letter that could be followed by a sequence of letters, digits (0 - 9) or underscore.
The first character in an identifier cannot be a [blank_start]digit[blank_end].
It must not contain any embedded space or symbol such as? - + ! # % ^ & * ( ) [ ] { } . ; : " ' / and \. However, an underscore ( _ ) can be used.
It should not be a C# keyword.
The prefix "@" enables the use of keywords as identifiers (a verbatim identifier)- Apredefined
- Bcompiler
- Cdigit
- Didentifier
12What is the use of the following keywords?
[blank_start]virtual[blank_end]
keyword is used to modify a method, property, indexer, or event declaration and allow for it to be overridden in a derived class.
[blank_start]override[blank_end]
modifier is required to extend or modify the abstract or virtual implementation of an inherited method, property, indexer, or event.
[blank_start]this[blank_end]
keyword refers to the current instance of the class and is also used as a modifier of the first parameter of an extension method.
[blank_start]new[blank_end]
Used to create objects and invoke constructors
[blank_start]sealed[blank_end]
When applied to a class, the modifier prevents other classes from inheriting from it.
Preventing a class from being inherited- Avirtual
- Boverride
- Cthis
- Dnew
- Esealed
13Access modifiers in C#
Five accessibility levels
[blank_start]public[blank_end] : Access is not restricted.
[blank_start]protected[blank_end] : Access is limited to the containing class or types derived from the containing class.
[blank_start]Internal[blank_end] : Access is limited to the current assembly.
[blank_start]Protected internal[blank_end]: Access is limited to the current assembly or types derived from the containing class.
[blank_start]private[blank_end] : Access is limited to the containing type.- Apublic
- Bprotected
- CInternal
- DProtected internal
- Eprivate
Informationen
- Beschreibung
- Quiz am Programming 3 revision, erstellt von Marty Collins am 25/04/2016.
- Autor
- Marty Collins
- Sprache
- English
- Aufrufe
- 1
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz