Skip to content

Commit

Permalink
BCA: CS: Upload Part-A answers for PYQ NEP-2020
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Pots committed Dec 14, 2024
1 parent bf238be commit afa429e
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions NEP2020/2024/BCA/3rdsem/cs/pyq/NEP-2020.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,77 @@
## Part-A

1. ### a) What is an HTML element? Give example.
An HTML Element consists of a start tag, content, and an end tag, which together define the element’s structure and functionality. Elements are the basic building blocks of a webpage and can represent different types of content, such as text, links, images, or headings. [[1](https://www.geeksforgeeks.org/html-elements/)]

```HTML
<!DOCTYPE html>
<html>

<head>
<title>BCA Students</title>
</head>

<body>
<p>Hello World!</p>
</body>

</html>
```

### b) What do you mean by Boxing/Unboxing?
- **Boxing**:
- The process of converting a Value Type variable (char, int etc.) to a Reference Type variable (object).
- Boxing is an implicit conversion process in which object type (super type) is used.
- Reference type variables (which are essentially references) are stored on the stack, while the actual data they point to is stored on the heap.
- **Unboxing**:
- The process of converting a Reference Type variable into a Value Type variable is known as Unboxing.
- It is an explicit conversion process. [[1](https://www.geeksforgeeks.org/c-sharp-boxing-unboxing/)]

### c) List any four operators which cannot be overloaded.
- **Member Access Operator**: Used to access members of a class or structure.
- **Type Casting Operator**: Used for explicit type conversion.
- **Sizeof Operator**: Used to obtain the size of a type in bytes.
- **Throw Operator**: Used to throw exceptions. [[1](https://www.geeksforgeeks.org/c-sharp-operator-overloading/)]

### d) What is the significance of component tray?
The component tray is a rectangular region displayed at the bottom of the design view window while in design view mode, once it is active. The component tray becomes active in design view after a component that is displayed in the component tray has been added to or is part of the current document. The significance of the Component Tray:
- Event Handling
- Ease of Use
- Visibility Control
- Resource Management [[1](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.design.componenttray?view=windowsdesktop-9.0)]

### e) Differentiate between TextBox and Label controls.
| Feature | TextBox | Label |
|------------------------|----------------------------------------------|--------------------------------------------|
| **Purpose** | Used for user input; allows text entry. | Used to display static text or information.|
| **User Interaction** | Editable by the user; can accept input. | Non-editable; users cannot modify the text.|
| **Text Property** | Can be changed at runtime based on user input. | Typically set at design time and remains constant.|
| **Appearance** | Can have different styles (multiline, password, etc.). | Simple text display; can be styled but not for input.|
| **Events** | Supports events like `TextChanged`, `KeyPress`, etc. | Supports events like `Click`, but not for text input.|
| **Focus** | Can receive focus and is part of the tab order. | Cannot receive focus; not part of the tab order.|
| **Use Case** | Ideal for forms where user input is required (e.g., entering names, passwords). | Ideal for displaying labels, instructions, or titles without user interaction. |

### f) Write the purpose of Dim and Redim keywords.
- **Dim**: The Visual Basic compiler uses the Dim statement to determine the variable's data type and other information, such as what code can access the variable. The following example declares a variable to hold an Integer value. [[1](https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/dim-statement)]
EXAMPLE:
```VB
Dim variable_name As Integer
```
- **ReDim**: The ReDim statement is used to size or resize a dynamic array that has already been formally declared by using a Private, Public, or Dim statement with empty parentheses (without dimension subscripts). [[1](https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/redim-statement)]
EXAMPLE:
```VB
ReDim X(10, 10, 10)
. . .
ReDim Preserve X(10, 10, 15)
```

### g) What is FormView control? List any two properties.
The FormView control is used to display a single record at a time from a data source. When you use the FormView control, you create templates to display and edit data-bound values. The templates contain controls, binding expressions, and formatting that define the look and functionality of the form. The Two properties are:
- Background
- Class Reference

### h) What is Simple Binding?
The ability of a control to bind to a single data element, such as a value in a column in a dataset table. This is the type of binding typical for controls such as a TextBox control or Label control, which are controls that typically only displays a single value. [[1](https://learn.microsoft.com/en-us/dotnet/desktop/winforms/data-binding-and-windows-forms?view=netframeworkdesktop-4.8)]

## Part-B [Unit-1]

Expand Down

0 comments on commit afa429e

Please sign in to comment.