Browse papers
A

Group 'A'

Rewrite the correct option of each question in your answer sheet.

9 questions·1 marks each
1mcq1 marks

What does C# stand for in C#.NET ?

  • A

    C-Sharp

  • B

    C- Simple

  • C

    C-Structure

  • D

    C-Secure

csharpdotnet
2mcq1 marks

'Implicit Conversion' follows the order of conversion as per compatibility of data type as :

  • A

    float < char < int

  • B

    char < int < float

  • C

    int < char < float

  • D

    float < int < char

csharptype-conversion
3mcq1 marks

What will be the output of 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

csharploopscontrol-flow
4mcq1 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 [ ];

csharparrays
5mcq1 marks

When does a structure variable get destroyed ?

  • A

    When no reference refers to it, it will get garbage collected.

  • B

    Depends on whether it is created using new or without new operator.

  • C

    As variable goes out of the scope

  • D

    Depends on either we free its memory using free( ) or delete( ).

csharpstructsmemory
6mcq1 marks

Which of the following would be best implemented using a struct instead of a class in C# ?

  • A

    Storing student's academic record, including subject and grades.

  • B

    Representing a 2D coordinate point (x, y) in a graphics application.

  • C

    Managing a list of employees with different job.

  • D

    Implementing a complex inventory system for online user.

csharpstructsvalue-types
7mcq1 marks

In C#, structure is used to define :

  • A

    A datatype that can hold a single value.

  • B

    A collection of variables of different type.

  • C

    A collection of methods

  • D

    A collection of properties

csharpstructs
8mcq1 marks

Among the given pointer which of the following cannot be incremented ?

  • A

    int

  • B

    char

  • C

    float

  • D

    void

csharppointers
9mcq1 marks

In C#, which method is used to execute an SQL INSERT query to add a new record to a database ?

  • A

    ExecuteQuery( )

  • B

    ExecuteNonQuery( )

  • C

    ExecuteReader( )

  • D

    ExecuteScalar( )

csharpdatabaseado-net
B

Group 'B'

Short Answer Questions

5 questions·5 marks each
10short5 marks

What do you mean by operator in C# ? Explain any two types with example. [1+4]

csharpoperators
11short5 marks

In C# application, you need to manage test scores for 30 students. How would you initialize array with scores, update the score of 10th student, and then display the score of all students.

Or

Write a C# program to add two 2times22\\times2 matrices and display the sum.

csharparraysmatrix
12short5 marks

Compare one-dimensional array and two-dimensional array in C#.

Or

Explain IndexOf( ) and compare any two string functions with examples in C#. [2+3]

csharparraysstrings
13short5 marks

Define structure in C#. Write a C# program to define a structure called a 'Book' that contains the following field : Title, Author and Price. Create an instance of the structure, assign values to the fields, and display them. [1+4]

csharpstructs
14short5 marks

Explain the advantages of using pointer in C#. In which scenario they should be used ? [2+3]

csharppointers
C

Group 'C'

Long Answer Questions

2 questions·8 marks each
15long8 marks

Explain different types of conditional control statement in C# with their syntax, functionality and provide real world example for each.

csharpcontrol-flowconditional-statements
16long8 marks

What are the steps required to establish a connection between a C# program and a database ? Explain with example.

Or

Explain any four methods in array class with program in C#.

csharpdatabaseado-netarrays