0% found this document useful (0 votes)
2 views4 pages

Tutorials

The document contains multiple choice questions and true/false statements related to C# programming and the .NET framework. It also includes structural questions that require detailed answers about concepts like garbage collection and constructors. The content is aimed at assessing knowledge in programming and human-computer interaction (HCI).
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Tutorials

The document contains multiple choice questions and true/false statements related to C# programming and the .NET framework. It also includes structural questions that require detailed answers about concepts like garbage collection and constructors. The content is aimed at assessing knowledge in programming and human-computer interaction (HCI).
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

FACTUAL PROGRAMMING AND HCI

PART I: Multiple Choice Questions (MCQs)

1. C# programming language is used to develop


A. Web apps
B. Desktop apps
C. Mobile apps
D. All of the above

2. A Which type of applications can be developed using .Net framework platform?


A. Console applications
B. Windows applications
C. Web services
D. All the above

3. In .Net, the memory allocation and de-allocation is done automatically by ............


A. CLS
B. CTS
C. JIT
D. Garbage collector

4. What is the extension of a C# language file?


A. .c
B. .cpp
C. .cs
D. .csp

5. Which assembly is used only by a single application?


A. Public assembly
B. Satellite assembly
C. Shared assembly
D. Private assembly

6. What is the correct syntax to declare a variable in C#?


A. type variableName = value;
B. type variableName;
C. variableName as type = value;
D. Both A. and B.

7. In visual basic the declaration of variables is done by --------- key word


A. Int
B. Dim
C. Static
D. Declare

8. What will be the output of the following C# code?

using System;

namespace MyApplication {
class Program {
static void Main(string[] args) {
double x = 10.25;
Console.Write(Convert.ToInt32(x));
}
}
}
A. 10.30
B. 10.25
C. 10
D. Error

9. Variable that value does not change during the execution of program is ----------
A. Variable
B. Constant
C. Numeric
D. None of the above

10. What will be the output of the following C# code, if the input is 123?

using System;

namespace MyApplication {
class Program {
static void Main(string[] args) {
Console.WriteLine("Enter a number:");
int num = Console.ReadLine();
Console.WriteLine("Given number is: " + num);
}
}
}
A. Given number is:123
B. Given number is: 123
C. Given number is: ”123”
D. Error

11. What does IDE stand for?


A. Integrated Design Environment
B. Integrated Development Environment
C. Interior Design Environment
D. Interior Development Environment

12. The C# and Visual Basic .NET belong to this type of programming language.
A. Assembly language
B. Machine language
C. High level programming language
D. Object oriented programming language

13. To declare an integer variable in VB.NET language, which one of the following
statements is true?
A. x As Integer
B. Dim x As Single
C. Dim x As Integer
D. Dim x As Int

14. Visual Basic is a tool that allows you to develop application in…………
A. Real time
B. Graphical User Interface
C. Any time
D. None of the above

15. Which of the following is not applicable for console application?


A. Write data to the console
B. Read data from the console
C. Run under DOS environment
D. Supports windows GUI

TRUE OR FALSE

i. C# supports foreach loop

ii. Every C# program requires at least one main static class.

iii. Floating point numbers hold exact representations of numbers.

iv. Overriding of a function is possible in the same class in C#.

v. C# doesn’t support multiple inheritances.

PART II: Structural Questions

1. What is the .NET framework? List .NET framework components.

2. What is Garbage collection?

3. What is the use of ReadKey() method in C#?

4. List four (4) access modifiers available in C#.

5. What is a Constructor? Give an example.

6. What happens when the new operator is executed?

You might also like