0
0
C Sharp (C#)programming~10 mins

How C# compiles and runs on CLR - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to declare a simple C# class.

C Sharp (C#)
public class [1] {
    public int Number { get; set; }
}
Drag options to blanks, or click blank then click option'
AMyClass
Bvoid
Cint
DMain
Attempts:
3 left
💡 Hint
Common Mistakes
Using a keyword like 'void' as a class name.
Using a data type like 'int' as a class name.
2fill in blank
medium

Complete the code to compile C# source into an intermediate language.

C Sharp (C#)
// The C# compiler converts source code into [1] code.
Drag options to blanks, or click blank then click option'
Aassembly
Bmachine
Cintermediate language
Dbyte
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing intermediate language with machine code.
Thinking the compiler produces assembly code directly.
3fill in blank
hard

Fix the error in the statement about CLR execution.

C Sharp (C#)
The CLR executes [1] code directly on the CPU.
Drag options to blanks, or click blank then click option'
Amachine
Bintermediate language
Csource
Dbyte
Attempts:
3 left
💡 Hint
Common Mistakes
Thinking CLR runs intermediate language code directly.
Confusing source code with executable code.
4fill in blank
hard

Fill both blanks to describe the compilation and execution process.

C Sharp (C#)
C# source code is compiled into [1] code, which the CLR then [2] into machine code at runtime.
Drag options to blanks, or click blank then click option'
Aintermediate language
Binterprets
Cjust-in-time compiles
Dbyte
Attempts:
3 left
💡 Hint
Common Mistakes
Saying CLR interprets IL instead of compiling it.
Confusing intermediate language with byte code.
5fill in blank
hard

Fill all three blanks to complete the explanation of C# execution on CLR.

C Sharp (C#)
The C# compiler generates [1] code, which is stored in [2] files. At runtime, the CLR uses [3] compilation to convert this code into machine instructions.
Drag options to blanks, or click blank then click option'
Aintermediate language
Bassembly
Cjust-in-time
Dexecutable
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing assembly files with executable files.
Thinking the compiler produces machine code directly.