BIT351 · Exam intelligence
NET Centric Computing important questions
From 4 past TU papers: which questions keep coming back, how much they carry, and what is most likely to show up next. Every question links to a model answer.
Most likely in the next examStatistical
Ranked by how often a topic is asked, its marks weight, and whether it is due after skipping the 2081.1 paper. No guarantees; study the whole syllabus.
1asked 2xavg 5 marks · due (skipped 2081.1) · Object-Relational Mapping conceptsAnswerHideWhat us the purpose of object relational mapper? Describe. [5]
What us the purpose of object relational mapper? Describe. [5]
--- An Object Relational Mapper (ORM) is a programming technique and tool that acts as a bridge between an object-oriented programming language and a relational database. It allows developers to interact with a database using objects and...
2asked 2xavg 8 marks · MVC pattern componentsAnswerHideDescribe the MVC pattern in ASP.NET. [5]
Describe the MVC pattern in ASP.NET. [5]
MVC (Model-View-Controller) is a software architectural design pattern that separates an application into three interconnected components, promoting organized code, separation of concerns, and easier maintainability. --- - Represents the...
3asked 2xavg 5 marks · React form creationAnswerHideHow do you create form using React? Illustrate with an example. [5]
How do you create form using React? Illustrate with an example. [5]
In React, forms are handled differently from regular HTML forms. React uses controlled components to manage form data, where form input values are controlled by the component's state. --- A controlled component is an input element whose ...
4asked 2xavg 5 marks · MSIL and CLR architectureAnswerHideExplain about MSIL and CLR. [5]
Explain about MSIL and CLR. [5]
MSIL and CLR
Note: The reference notes did not contain this topic. The following answer is based on standard .NET / C# curriculum content taught in BSc CSIT.
1. MSIL (Microsoft Intermediate Language)
MSIL (also called CIL - Common Intermediate Language) is a low-level, platform-independent instruction set into which all .NET-compatible languages (C#, VB.NET, F#, etc.) are compiled before being converted to native machine code.
Key Points:
- When a programmer writes code in C# (or any .NET language) and compiles it, the compiler does not produce native machine code directly.
- Instead, it produces MSIL code stored inside an assembly (
.exeor.dllfile). - MSIL is CPU-independent - it is not tied to any specific processor or operating system.
- MSIL contains instructions for loading, storing, calling methods, arithmetic operations, etc., in a generalized form.
- It also contains metadata - information about types, methods, and references used in the program.
Compilation Flow:
Source Code (.cs)
|
[C# Compiler]
|
MSIL Code + Metadata (stored in Assembly)
|
[CLR / JIT Compiler]
|
Native Machine Code (executed by CPU)
2. CLR (Common Language Runtime)
CLR is the execution engine (runtime environment) of the .NET Framework. It is responsible for loading, executing, and managing .NET programs.
Key Responsibilities of CLR:
| Function | Description |
|---|---|
| JIT Compilation | Converts MSIL into native machine code at runtime using the Just-In-Time (JIT) compiler |
| Memory Management | Automatically allocates and deallocates memory |
| Garbage Collection (GC) | Automatically reclaims unused objects from the heap |
| Type Safety | Ensures that code accesses only the memory it is authorized to access |
| Exception Handling | Provides a structured mechanism to handle runtime errors |
| Security | Enforces code access security and role-based security |
| Thread Management | Manages multithreading and synchronization |
| Interoperability | Allows .NET code to interact with unmanaged (native) code |
How CLR Works:
- The CLR loads the assembly (containing MSIL).
- The JIT compiler inside CLR converts MSIL to native machine code specific to the current CPU.
- The native code is then executed by the operating system.
- CLR continuously manages the running program (GC, exceptions, security, etc.).
Relationship Between MSIL and CLR
| MSIL | CLR |
|---|---|
| Intermediate code produced by compiler | Runtime that executes the intermediate code |
| Platform-independent | Platform-specific (different CLR for different OS) |
| Stored in assembly files | Installed as part of .NET Framework |
| Input to CLR | Processes and runs MSIL |
Summary
MSIL is the intermediate, platform-independent bytecode that .NET compilers produce. CLR is the runtime environment that takes this MSIL, compiles it to native code via JIT, and manages its execution including memory, security, and exception handling. Together, they form the foundation of the .NET execution model.
5asked 2xavg 5 marks · Cookies definition and usesAnswerHideDefine cookies. What are the uses of hidden fields? [5]
Define cookies. What are the uses of hidden fields? [5]
Cookies and Hidden Fields
Cookies (Definition)
A cookie is a small piece of text data that a web server sends to a client's browser, which the browser stores locally on the user's machine. When the browser makes subsequent requests to the same server, it automatically sends the stored cookie back, allowing the server to identify and remember the user across multiple requests.
Key characteristics of cookies:
- Stored on the client side (user's browser/machine)
- Have an expiry date/time (session cookies expire when browser closes; persistent cookies have a set expiry)
- Associated with a specific domain and path
- Set using the
Set-CookieHTTP response header - Sent back to the server via the
CookieHTTP request header
Example:
Set-Cookie: username=JohnDoe; expires=Fri, 31 Dec 2025 12:00:00 GMT; path=/
Common uses of cookies:
- User authentication and session management
- Storing user preferences
- Tracking user behavior
- Shopping cart persistence
Hidden Fields
A hidden field is an HTML form element (<input type="hidden">) that stores data within a web form but is not visible to the user on the browser screen. The data is submitted to the server when the form is submitted.
Syntax:
<input type="hidden" name="userID" value="1023">
Uses of Hidden Fields
| Use | Description |
|---|---|
| State Management | Maintain state information (e.g., user ID, session token) across multiple page requests without cookies |
| Passing Data Between Pages | Transfer data from one page to another through form submission without displaying it to the user |
| Security Tokens (CSRF Protection) | Store anti-CSRF tokens to validate that form submissions are legitimate |
| Tracking Form Progress | In multi-step forms (wizards), carry forward data collected in previous steps |
| Storing Record IDs | Pass database record IDs (e.g., product ID, order ID) back to the server during form submission |
| Preserving Original Values | Store original field values to detect changes made by the user before update |
Key Difference
| Feature | Cookies | Hidden Fields |
|---|---|---|
| Storage | Client's browser/disk | Inside HTML form |
| Visibility | Not visible in page | Not visible on screen but visible in page source |
| Persistence | Can persist across sessions | Only available during form submission |
| Sent to server | With every HTTP request | Only on form submission |
Most repeated questions
Topics asked at least twice, most-asked first.
asked 2xavg 5 marks · 2080, 0AnswerHideWhat us the purpose of object relational mapper? Describe. [5]
What us the purpose of object relational mapper? Describe. [5]
--- An Object Relational Mapper (ORM) is a programming technique and tool that acts as a bridge between an object-oriented programming language and a relational database. It allows developers to interact with a database using objects and...
asked 2xavg 8 marks · 2081.1, 2081AnswerHideDescribe the MVC pattern in ASP.NET. [5]
Describe the MVC pattern in ASP.NET. [5]
MVC (Model-View-Controller) is a software architectural design pattern that separates an application into three interconnected components, promoting organized code, separation of concerns, and easier maintainability. --- - Represents the...
asked 2xavg 5 marks · 2081.1, 2081AnswerHideHow do you create form using React? Illustrate with an example. [5]
How do you create form using React? Illustrate with an example. [5]
In React, forms are handled differently from regular HTML forms. React uses controlled components to manage form data, where form input values are controlled by the component's state. --- A controlled component is an input element whose ...
asked 2xavg 5 marks · 2081.1, 2080AnswerHideExplain about MSIL and CLR. [5]
Explain about MSIL and CLR. [5]
MSIL and CLR
Note: The reference notes did not contain this topic. The following answer is based on standard .NET / C# curriculum content taught in BSc CSIT.
1. MSIL (Microsoft Intermediate Language)
MSIL (also called CIL - Common Intermediate Language) is a low-level, platform-independent instruction set into which all .NET-compatible languages (C#, VB.NET, F#, etc.) are compiled before being converted to native machine code.
Key Points:
- When a programmer writes code in C# (or any .NET language) and compiles it, the compiler does not produce native machine code directly.
- Instead, it produces MSIL code stored inside an assembly (
.exeor.dllfile). - MSIL is CPU-independent - it is not tied to any specific processor or operating system.
- MSIL contains instructions for loading, storing, calling methods, arithmetic operations, etc., in a generalized form.
- It also contains metadata - information about types, methods, and references used in the program.
Compilation Flow:
Source Code (.cs)
|
[C# Compiler]
|
MSIL Code + Metadata (stored in Assembly)
|
[CLR / JIT Compiler]
|
Native Machine Code (executed by CPU)
2. CLR (Common Language Runtime)
CLR is the execution engine (runtime environment) of the .NET Framework. It is responsible for loading, executing, and managing .NET programs.
Key Responsibilities of CLR:
| Function | Description |
|---|---|
| JIT Compilation | Converts MSIL into native machine code at runtime using the Just-In-Time (JIT) compiler |
| Memory Management | Automatically allocates and deallocates memory |
| Garbage Collection (GC) | Automatically reclaims unused objects from the heap |
| Type Safety | Ensures that code accesses only the memory it is authorized to access |
| Exception Handling | Provides a structured mechanism to handle runtime errors |
| Security | Enforces code access security and role-based security |
| Thread Management | Manages multithreading and synchronization |
| Interoperability | Allows .NET code to interact with unmanaged (native) code |
How CLR Works:
- The CLR loads the assembly (containing MSIL).
- The JIT compiler inside CLR converts MSIL to native machine code specific to the current CPU.
- The native code is then executed by the operating system.
- CLR continuously manages the running program (GC, exceptions, security, etc.).
Relationship Between MSIL and CLR
| MSIL | CLR |
|---|---|
| Intermediate code produced by compiler | Runtime that executes the intermediate code |
| Platform-independent | Platform-specific (different CLR for different OS) |
| Stored in assembly files | Installed as part of .NET Framework |
| Input to CLR | Processes and runs MSIL |
Summary
MSIL is the intermediate, platform-independent bytecode that .NET compilers produce. CLR is the runtime environment that takes this MSIL, compiles it to native code via JIT, and manages its execution including memory, security, and exception handling. Together, they form the foundation of the .NET execution model.
asked 2xavg 5 marks · 2081.1, 0AnswerHideDefine cookies. What are the uses of hidden fields? [5]
Define cookies. What are the uses of hidden fields? [5]
Cookies and Hidden Fields
Cookies (Definition)
A cookie is a small piece of text data that a web server sends to a client's browser, which the browser stores locally on the user's machine. When the browser makes subsequent requests to the same server, it automatically sends the stored cookie back, allowing the server to identify and remember the user across multiple requests.
Key characteristics of cookies:
- Stored on the client side (user's browser/machine)
- Have an expiry date/time (session cookies expire when browser closes; persistent cookies have a set expiry)
- Associated with a specific domain and path
- Set using the
Set-CookieHTTP response header - Sent back to the server via the
CookieHTTP request header
Example:
Set-Cookie: username=JohnDoe; expires=Fri, 31 Dec 2025 12:00:00 GMT; path=/
Common uses of cookies:
- User authentication and session management
- Storing user preferences
- Tracking user behavior
- Shopping cart persistence
Hidden Fields
A hidden field is an HTML form element (<input type="hidden">) that stores data within a web form but is not visible to the user on the browser screen. The data is submitted to the server when the form is submitted.
Syntax:
<input type="hidden" name="userID" value="1023">
Uses of Hidden Fields
| Use | Description |
|---|---|
| State Management | Maintain state information (e.g., user ID, session token) across multiple page requests without cookies |
| Passing Data Between Pages | Transfer data from one page to another through form submission without displaying it to the user |
| Security Tokens (CSRF Protection) | Store anti-CSRF tokens to validate that form submissions are legitimate |
| Tracking Form Progress | In multi-step forms (wizards), carry forward data collected in previous steps |
| Storing Record IDs | Pass database record IDs (e.g., product ID, order ID) back to the server during form submission |
| Preserving Original Values | Store original field values to detect changes made by the user before update |
Key Difference
| Feature | Cookies | Hidden Fields |
|---|---|---|
| Storage | Client's browser/disk | Inside HTML form |
| Visibility | Not visible in page | Not visible on screen but visible in page source |
| Persistence | Can persist across sessions | Only available during form submission |
| Sent to server | With every HTTP request | Only on form submission |
Study every one of these with model answers, flashcards, and MCQs.
Open BIT351 study modes