IT111 (Module 1 & 3)

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/61

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

62 Terms

1
New cards

Events in Windows Forms are actions triggered by user interactions.

TF

T

2
New cards

Event handlers in Windows Forms define the actions taken when events occur.

TF

T

3
New cards

Button is an example of a common control in Windows Forms.

TF

T

4
New cards

Windows Forms is primarily designed for the Linux OS.

TF

F

5
New cards

Windows Forms allows developers to create desktop applications for macOS.

TF

F

6
New cards

Common properties in Windows Forms include Text, Enabled, and Visible.

TF

T

7
New cards

What enables responsive applications in Windows Forms?

  1. Variables

  2. Properties

  3. Events

  4. Methods

Events

8
New cards

What are the examples of common Windows Forms controls?

  1. Menu, Toolbar, Panel, Grid

  2. Slider, Checkbox, Switch, Radio Button

  3. Image, Video, Audio

  4. Button, TextBox, Label, CheckBox, ComboBox

Button, TextBox, Label, CheckBox, ComboBox

9
New cards

What defines the appearance and behavior of controls in Windows Forms?

  1. Events

  2. Properties

  3. Variables

  4. Methods

Properties

10
New cards

What is the purpose of Windows Forms?

  1. To design mobile apps.

  2. To allow developers to create rich graphical applications for Windows OS.

  3. To build web applications.

  4. To manage databases.

To allow developers to create rich graphical applications for Windows OS.

11
New cards

A collection of classes.

  1. methods

  2. namespace

  3. using

  4. my college life

namespace

12
New cards

A ______________ tells the program that the current line of the statement has ended.

  1. colon

  2. programmer

  3. semicolon

  4. comma

semicolon

13
New cards

This typecasting is carried out automatically by the compiler.

  1. implicit

  2. explicit

  3. magic

implicit

14
New cards

How do you define a class?

  1. By putting the keyword "class" before the name of the class.

  2. By putting the keyword "class" after the name of the class.

  3. By saying "I define you!"

By putting the keyword "class" before the name of the class.

15
New cards

Which of the following is not an access modifier?

  1. public

  2. private

  3. external

  4. internal

external

16
New cards

In the following method, what is the method name?

public static void Main(String[ ] args)

  1. String

  2. void

  3. Main

  4. public void

Main

17
New cards

args in the the method statement means arrays.

TF

F

18
New cards

These are the special methods in a class 

  1. methods

  2. constructors

  3. class

constructors

19
New cards

These represent the behavior of an Object.

  1. Fields

  2. Properties

  3. Methods

  4. I am not sure, I will ask my cousin.

Fields

20
New cards

Which of the following is not a repetition statement?

  1. do

  2. foreach

  3. while

  4. goto

goto

21
New cards

Which of the following iteration constructs is most specialized for use with collections?

  1. for

  2. foreach

  3. while

  4. do

foreach

22
New cards

Which of the following iteration constructs evaluate their conditions after executing the statements they control?

  1. do

  2. while

  3. foreach

  4. for

do

23
New cards

Given the for loop with the conditional “(int i 0; i <5; ... )”, what is the third sub-statement that would allow the loop to execute five times?

  1. ++i

  2. i++

  3. I--

  4. I+-

i++

24
New cards

Which of the following keyword is used for including the namespaces in the program in C#?

  1. class

  2. namespace

  3. using

  4. none of the choices

using

25
New cards

Which of the following is correct about variable naming conventions in C#?

  1. A name must begin with a letter that could be followed by a sequence of letters, digits (0-9) or underscore.

  2. No embedded space or symbols such as - + ! @ # % ^ & * () {} [].

  3. Both choices are correct.

Both choices are correct.

26
New cards

Which of the following converts a type to a 32-bit integer in C#?

  1. A priest

  2. ToDouble

  3. ToInt16

  4. ToInt32

ToInt32

27
New cards

Main Method statement ends with a semicolon.

TF

F

28
New cards

Which of the following is not an object of a class course?

  1. IT101-1

  2. IT111

  3. CIS201

  4. IT111L

CIS201

29
New cards

A loop becomes infinite loop if a condition never becomes true.

TF

F

30
New cards

Which of the following statement is correct to illustrate that an array named numbers can hold five integers?

  1. int[ ] numbers = int[5]

  2. int[ ] numbers = new int[5]

  3. int numbers = new int[5] { 1, 2, 3, 4, 5};

  4. int numbers = new int { 1, 2, 3, 4, 5};

int[ ] numbers = new int[5]

31
New cards

How can you access an element in an array?

  1. By indexing the array name

  2. By searching through the entire array

  3. By using a for loop

  4. By using the new keyword

By indexing the array name

32
New cards

What is a jagged array?

  1. An array with a flexible size

  2. An array with jagged edges

  3. An array with random values

  4. An array of arrays

An array of arrays

33
New cards

How can you assign values to an array at the time of declaration?

  1. datatype[] arrayName = { value1, value2, ... };

  2. datatype[][] arrayName = { value1, value2, ... };

  3. datatype[] arrayName = new datatype[];

  4. datatype arrayName = new datatype[];

datatype[] arrayName = { value1, value2, ... };

34
New cards

What does the Array Class provide?

  1. A way to sort arrays

  2. Properties and methods for working with arrays

  3. A class for creating multi-dimensional arrays

  4. An interface for creating arrays

Properties and methods for working with arrays

35
New cards

What happens when you create an array in C#?

  1. The array elements remain uninitialized

  2. You create a variable

  3. Each array element is initialized to a default value

  4. The array elements are set to random values

Each array element is initialized to a default value

36
New cards

What is an array used for?

  1. To store a collection of data of the same type

  2. To store a dynamic collection of data

  3. To store a collection of data of different types

  4. To say when you are physically hurt

To store a collection of data of the same type

37
New cards

What is a param array used for?

  1. Passing unknown number of parameters to a function

  2. Passing a fixed number of parameters to a function

  3. Passing arrays to a function

  4. When you are asking to borrow something

Passing unknown number of parameters to a function

38
New cards

How is an array declared in C#?

  1. arrayName[][] = new datatype[];

  2. datatype[][] arrayName;

  3. datatype[] arrayName;

  4. arrayName = new datatype[];

datatype[] arrayName;

39
New cards

What is a two-dimensional array?

  1. An array with elements like avatar

  2. An array with unknown number of dimensions

  3. An array with two elements

  4. A multidimensional array with two dimensions

A multidimensional array with two dimensions

40
New cards

Which of the following is not a data type in C#?

  1. bool

  2. int

  3. sling

  4. double

sling

41
New cards

What is the size of the double data type in C#? 

  1. 4 bytes

  2. Depends on the system architecture 

  3. 16 bytes

  4. 8 bytes

8 bytes

42
New cards

A static method can access instance variables of a class directly.

TF

F

43
New cards

Which of the following is the correct syntax to declare a constant in C#? 

  1. int constant myValue = 10; 

  2. readonly int myValue = 10;

  3. final int myValue = 10;

  4. const int myValue = 10;

const int myValue = 10;

44
New cards

What is the output of the following code? 

public int Multiply(int a, int b = 2) 

    return a * b; 

}

 static void Main(string[] args) 

{

Multiply(5);

}

  1. 10

  2. 15

  3. 5

  4. compilation error

10

45
New cards

In C#, the decimal data type is used for financial and monetary calculations due to its higher precision than float or double. 

TF

T

46
New cards

Which of the following is a correct way to implicitly convert a smaller type to a larger type? 

  1. int x = 10; long y = x;

  2. int x = 10; long y = (int)x; 

  3. int x = 10; long y = (short)x; 

  4. int x = 10; long y = (long)x; 

int x = 10; long y = x;

47
New cards

Which of the following is a reference type in C#?

  1. object

  2. bool

  3. char

  4. byte

object

48
New cards

What is the default return type of a method in C# that does not return any value? 

  1. null

  2. int

  3. string

  4. void

void

49
New cards

What is the default value of elements in an integer array in C#?

  1. 0

  2. 1

  3. undefined

  4. null

0

50
New cards

Array elements can be of different data types.

TF

F

51
New cards

Which of the following correctly defines a method with parameters in C#? 

  1. public void MyMethod( ) int 

  2. public void MyMethod[ ] 

  3. public void MyMethod(int a, int b) 

  4. public void MyMethod(int a int b) 

public void MyMethod(int a, int b) 

52
New cards

What will be the result of the following expression?  

int x = 10; 

int y = 3; 

int result = x % y;

  1. 0

  2. 2

  3. 3

  4. 1

1

53
New cards

A method can never have return statements.

TF

F

54
New cards

What is the value of the following boolean expression? 

bool result = (5 > 3) && (3 < 2); 

  1. true

  2. void

  3. false

  4. null

false

55
New cards

The ref keyword in a method allows a parameter to be passed by reference, enabling the method to modify the original value. 

TF

T

56
New cards

Which of the following is true about method overloading in C#? 

  1. Let me call a friend to answer. 

  2. Method overloading allows multiple methods with the same name but different return types.

  3. Method overloading is not supported in C#. 

  4. Method overloading allows multiple methods with the same name but different parameter types or counts. 

Method overloading allows multiple methods with the same name but different parameter types or counts. 

57
New cards

What keyword is used to exit a method and return a value in C#? 

  1. exit

  2. return

  3. break

  4. continue

return

58
New cards

Which of the following data types is used for a large range of floating-point numbers?

  1. float

  2. double

  3. short

  4. decimal

double

59
New cards

The float data type has higher precision than the double data type.  

TF

F

60
New cards

What is the correct syntax to initialize an array of integers with the values 1, 2, 3, 4, 5?

  1. int arr[ ] = [1, 2, 3, 4, 5];

  2. int[ ] arr = {1, 2, 3, 4, 5};

  3. int [ ] arr = [1, 2, 3, 4, 5];

  4. int[ ] arr = new int(1, 2, 3, 4, 5);

int[ ] arr = {1, 2, 3, 4, 5};

61
New cards

Which of the following is the correct way to declare an integer array?  

  1. int[ ] arr = new int[5];

  2. int arr [ ] = new int( );

  3. int[ ] arr = new int(5);

  4. int arr[ ] = new int[5];  

int[ ] arr = new int[5];

62
New cards

How do you declare a two-dimensional array of integers?

  1. int[,] arr = new int[3][3]; 

  2. int[2] arr = new int[3][3];  

  3. int[][] arr = new int[3][3]; 

  4. int[,] arr = new int[3, 3]; 

int[,] arr = new int[3, 3];