For More Quiz Questions click here to download Global Quiz on Google PlayStore

NATIONAL OPEN UNIVERSITY OF NIGERIA

UNIVERSITY VILLAGE, PLOT 91, CASDASTRAL ZONE, NNAMDI AZIKIWE EXPRESS WAY, JABI, ABUJA.
FACULTY OF SCIENCES
MARCH/APRIL 2016 EXAMINATION

COURSE CODE:                                                                              CIT 351                                                                               

COURSE TITLE:                                                                             C# Programming

DURATION:                                                                                     2½ Hours

INSTRUCTIONS:                                                                            Answer any Four (4) Questions

 

1a.       State the general syntax for declaring a variable in C#                                                        4 marks

1b.       State the main role of each part of the syntax                                                                       4 marks

1c.       Give the guiding principle for accomplishing the following:

  1. Grouping statements into one unit                                                                             2 marks
  2. Designing an end statement                                                                                                    2 marks
  3. Enhancing a source code legibility                                                                              2 marks

1d.       Enumerate 4 most commonly used data types in C# programming                                3 ½ marks

                                                                                                                                       [Total = 17 ½ marks]

 

2a.       Describe how memory leaks are handled in C# programming?                                      5 ½ marks

2b.       Give a brief explanation of any 3 template types accessible in Visual C# projects         12 marks

                                                                                                                                       [Total = 17 ½ marks]

 

3a        What is the main significance of VisualStudio.NET with respect to having an Integrated Development Environment?                                                                                                             2 ½ marks

3b        List 3 regular programming tasks carried out in VisualStudio.NET                                   6 marks

3c.       What is the implication of using the Microsoft’s .NET Framework libraries when naming objects in C#?                                                                                                                                  4 marks

3d        Spot 5 statements in the following source code specifying their corresponding roles.

            IntsampleVariable;

            sampleVariable = 5;

            Method();

            SampleClasssampleObject = newSampleClass();

            sampleObject.ObjectMethod();

            <//executing a “for” loop with an embedded “if” statement                                                   5 marks

                                                                                                                                       [Total = 17 ½ marks]

 

4a        Give any four (4) reasons why statements are considered to be critical for C# program execution.

4b        With the aid of two (2) common examples, explain why C# is said to be a case-sensitive programming language.                                                                                                            4 marks

 

4c        Write down the corresponding C# alias of the following C# Primitive types:

  1. Int32                                                                                                                              ½ marks
  2. Single                                                                                                                                1 mark
  3. Int64                                                                                                                                 1 mark
  4. Double                                                                                                                              2 mark
  5. Byte                                                                                                                                  1 mark
  6. Char                                                                                                                                  1 mark
  7. Decimal                                                                                                                            1 mark
  8. SByte                                                                                                                                1 mark
  9. UInt32                                                                                                                                          1 mark

             9 ½ marks

                                                                                                                                       [Total = 17 ½ marks]

 

5.         Study the figure provided and answer the subsequent questions:

            Using System;

public class Fib{

    Decimal current;

    Decimal last;

   public Fib(){

        current = 1;

        last = 0;

}

 

private Fib(Decimal last, Decimal secondToLast){

    current = last+secondToLast;

    this.last = last;

}

 

public Fib GetNext(){

     return new FiB(current.last);

}

 

public Decimal Value{

     get{return current;}

}

          }

5a.       Identify and name the object within the source code.                                                          3 marks

5b.       Write the command line for compiling this object.                                                         10 ½ marks

5c.       Name any 2 operators in this source code.                                                                                       4 marks

                                                                                                                                       [Total = 17 ½ marks]

 

6a.       Write down the source code for compiling a file named Economy.cs on the hard drive

of a computer.                                                                                                                        6 ½ marks

6b.       Provide the appropriate comment for the following:

  1. XML documentation
  2. Multiple line
  3. Single line                                                                                                               3 marks each

6c.       What is the implication of declaring a Method as static?                                                     2 marks

                                                                                                                                       [Total = 17 ½ marks]


For More Quiz Questions click here to download Global Quiz on Google PlayStore


Select NOUN Past Questions & Answers by Faculties

Sciences

National Open University of Nigeria (NOUN) Faculty of Sciences Past Questions and Answers.

Education

National Open University of Nigeria (NOUN) Faculty of Education Past Questions and Answers.

Arts & Social Sciences

National Open University of Nigeria (NOUN) Faculty of Arts and Social Sciences Past Questions and Answers.

Law

National Open University of Nigeria (NOUN) Faculty of Law Past Questions and Answers.

Management Sciences

National Open University of Nigeria (NOUN) Faculty of Management Sciences Past Questions and Answers.

Health Sciences

National Open University of Nigeria (NOUN) Faculty of Health Sciences Past Questions and Answers.

Agriculture Sciences

National Open University of Nigeria (NOUN) Faculty of Agricultural Sciences Past Questions and Answers.

Select Project Topics & Materials by Categories

Accounting

Universities, Polytechnic's and Colleges of Education Accounting Project Topics and Materials.

Biology

Universities, Polytechnic's and Colleges of Education Biology Project Topics and Materials.

Business Education

Universities, Polytechnic's and Colleges of Education Business Education Project Topics and Materials.

Chemistry

Universities, Polytechnic's and Colleges of Education Chemistry Project Topics and Materials.

Computer Science

Universities, Polytechnic's and Colleges of Education Computer Science Project Topics and Materials.

Criminology & Security

Universities, Polytechnic's and Colleges of Education Criminology & Security Project Topics and Materials.

Economics

Universities, Polytechnic's and Colleges of Education Economics Project Topics and Materials.

Education

Universities, Polytechnic's and Colleges of Education Education Project Topics and Materials.

English/Linguistic

Universities, Polytechnic's and Colleges of Education English/Linguistic Project Topics and Materials.

Entrepreneurship

Universities, Polytechnic's and Colleges of Education Entrepreneurship Project Topics and Materials.

Environmental Science

Universities, Polytechnic's and Colleges of Education Environmental Science Project Topics and Materials.

Law

Universities, Polytechnic's and Colleges of Education Law Project Topics and Materials.

Marketing

Universities, Polytechnic's and Colleges of Education Marketing Project Topics and Materials.

Physics

Universities, Polytechnic's and Colleges of Education Physics Project Topics and Materials.

Political Science

Universities, Polytechnic's and Colleges of Education Political Science Project Topics and Materials.

Public Administration

Universities, Polytechnic's and Colleges of Education Public Administration Project Topics and Materials.

How to login to NOUN Elearn Portal

You can now use you matric number to login as your username and  password in a lowercase.

https://elearn.nouedu2.net/login/

Note that you are to change your passw...

Facebook posts