EVENT DRIVEN MIDTERMS

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

1/381

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.

382 Terms

1
New cards

C. Main Thread

This is the first thread to be performed in a process.

2
New cards

A. Parent Thread

3
New cards

B. Child Thread

4
New cards

C. Main Thread

5
New cards

D. Start Thread#B. ApplicationException

Which basic type of exception is user program-

6
New cards

generated?

7
New cards

A. ArithmeticException

8
New cards

B. ApplicationException

9
New cards

C. SystemException

10
New cards

D. ThreadException#B. Unstarted

In this thread state, the thread is created within the

11
New cards

CLR but is not in progress.

12
New cards

A. Ready

13
New cards

B. Unstarted

14
New cards

C. WaitSleepJoin

15
New cards

D. Blocked#B. ThreadState

What property is used to get the value that contains

16
New cards

the states of the recent thread?

17
New cards

A. Priority

18
New cards

B. ThreadState

19
New cards

C. CurrentThread

20
New cards

D. IsAlive#B. System.Threading

Which namespace Includes the Thread class?

21
New cards

A. System.Multithread

22
New cards

B. System.Threading

23
New cards

C. System.Multithread.Thread

24
New cards

D. System.Threaded#D. OutOfMemoryException

Which exception is thrown when the available

25
New cards

memory is too low to accommodate?

26
New cards

A. LowMemoryException

27
New cards

B. OverflowException

28
New cards

C. IndexOutOfRangeException

29
New cards

D. OutOfMemoryException#B. Running

This thread state indicates that a thread is at the

30
New cards

time of execution after invoking its Start method.

31
New cards

A. Ready

32
New cards

B. Running

33
New cards

C. Started

34
New cards

D. WaitSleepJoin#B. Common Language Runtime

What does CLR stand for?

35
New cards

A. Computer Language Running

36
New cards

B. Common Language Runtime

37
New cards

C. Common Languages Running

38
New cards

D. Computer Languages Runtime#D. Stopped

This is the state when the thread has completed its

39
New cards

task.

40
New cards

A. Blocked

41
New cards

B. Started

42
New cards

C. Unstarted

43
New cards

D. Stopped#C. FormatException

This exception occurs when the format of the

44
New cards

argument is invalid.

45
New cards

A. InvalidFormatException

46
New cards

B. StackOverflowException

47
New cards

C. FormatException

48
New cards

D. OutOfFormatException#B. ArgumentException

Which of the following exceptions is thrown when an

49
New cards

argument inside the method is invalid?

50
New cards

A. InvalidException

51
New cards

B. ArgumentException

52
New cards

C. InvalidMethodException

53
New cards

D. InvalidArgumentException#A. IndexOutOfRangeException

This exception occurs when attempting to index an

54
New cards

array through an index that is greater than the

55
New cards

maximum length of the index.

56
New cards

A. IndexOutOfRangeException

57
New cards

B. IndexRangeException

58
New cards

C. ArgumentRangeException

59
New cards

D. FormatRangeException#C. Name

This property is used to set the name of the thread.

60
New cards

A. IsName

61
New cards

B. ThreadName

62
New cards

C. Name

63
New cards

D. SetName#C. StackOverflowException

This exception occurs when the execution stack is

64
New cards

exhausted by having too many pending method

65
New cards

calls.

66
New cards

A. OutOfMemoryException

67
New cards

B. IndexOutOfRangeException

68
New cards

C. StackOverflowException

69
New cards

D. ArgumentException#A. CurrentThread

This is used to retum the currently executing thread.

70
New cards

A. CurrentThread

71
New cards

B. Running

72
New cards

C. IsBackground

73
New cards

D. Name#B.

74
New cards

try

75
New cards

{

76
New cards

Console.Write(x + " ");

77
New cards

Thread.Sleep(1000);

78
New cards

}

79
New cards

catch(ThreadAbortException ex)

80
New cards

{

81
New cards

if((int)ex.ExceptionState == 0)

82
New cards

{

83
New cards

Thread.ResetAbort();

84
New cards

}

85
New cards

}

  1. Which of the following is the correct syntax to
86
New cards

withdraw an abort request for the ongoing thread?

87
New cards

A.

88
New cards

try

89
New cards

{

90
New cards

Console.Write(x + “ “ );

91
New cards

Thread.Sleep(1000);

92
New cards

}

93
New cards

catch(ThreadAbortException ex)

94
New cards

{

95
New cards

if((int)ex.ExceptionState == 0)

96
New cards

{

97
New cards

Thread.Reset():

98
New cards

}

99
New cards

}

100
New cards

B.