National Examinations Board Grade 12 Visual Programming Exam Question Paper 2082 (2025)
National Examinations Board · Visual Programming (Grade 12) · 2082 BS · Regular / Partial Examination — 16 questions — a free old question paper on Goodone.club’s exam-paper archive.
- What does C# stand for in C#.NET? (A) C-Sharp (B) C-Simple (C) C-Structure (D) C-Secure [1 marks]
- Implicit conversion follows which order according to data-type compatibility? (A) float < char < int (B) char < int < float (C) int < char < float (D) float < int < char [1 marks]
- What is the output of the following program? for (int i = 0; i < 5; i++) { if (i == 2) continue; console.Write(i + " "); } (A) 0 1 3 4 (B) 0 1 2 3 4 (C) 0 1 4 (D) Compilation Error [1 marks]
- Which of the following represents a two-dimensional array in C#? (A) int[,] arr = new int[2, 3]; (B) int[][] arr = new int[2, 3]; (C) int[] arr = new int[2, 3]; (D) int[2, 3] arr = new int[]; [1 marks]
- When does a structure variable get destroyed? (A) When no reference refers to it, it is garbage collected. (B) It depends on whether it is created using new or without the new operator. (C) As the variable goes out of scope. (D) It depends on whether its memory is freed using free() or delete(). [1 marks]
- Which would be best implemented using a struct instead of a class in C#? (A) Storing a student's academic record, including subjects and grades. (B) Representing a 2D coordinate point (x, y) in a graphics application. (C) Managing a list of employees with different jobs. (D) Implementing a complex inventory system for online users. [1 marks]
- In C#, a structure is used to define: (A) A datatype that can hold a single value. (B) A collection of variables of different types. (C) A collection of methods. (D) A collection of properties. [1 marks]
- Among the given pointer types, which cannot be incremented? (A) int (B) char (C) float (D) void [1 marks]
- In C#, which method executes an SQL INSERT query to add a new record to a database? (A) ExecuteQuery() (B) ExecuteNonQuery() (C) ExecuteReader() (D) ExecuteScalar() [1 marks]
- What do you mean by operator in C#? Explain any two types with examples. [5 marks]
- In a C# application, you need to manage test scores for 30 students. How would you initialize an array with scores, update the score of the 10th student, and then display all scores? OR Write a C# program to add two 2×2 matrices and display the sum. [5 marks]
- Compare one-dimensional and two-dimensional arrays in C#. OR Explain IndexOf() and compare any two string functions with examples in C#. [5 marks]
- Define structure in C#. Write a C# program to define a structure called 'Book' containing Title, Author and Price, create an instance, assign values and display them. [5 marks]
- Explain the advantages of using pointers in C#. In which scenarios should pointers be used? [5 marks]
- Explain different types of conditional control statements in C#, including syntax and functionality, and give a real-world example of each. [8 marks]
- What steps are required to establish a connection between a C# program and a database? Explain with an example. OR Explain any four methods in the Array class with a C# program. [8 marks]