1/61
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Events in Windows Forms are actions triggered by user interactions.
TF
T
Event handlers in Windows Forms define the actions taken when events occur.
TF
T
Button is an example of a common control in Windows Forms.
TF
T
Windows Forms is primarily designed for the Linux OS.
TF
F
Windows Forms allows developers to create desktop applications for macOS.
TF
F
Common properties in Windows Forms include Text, Enabled, and Visible.
TF
T
What enables responsive applications in Windows Forms?
Variables
Properties
Events
Methods
Events
What are the examples of common Windows Forms controls?
Menu, Toolbar, Panel, Grid
Slider, Checkbox, Switch, Radio Button
Image, Video, Audio
Button, TextBox, Label, CheckBox, ComboBox
Button, TextBox, Label, CheckBox, ComboBox
What defines the appearance and behavior of controls in Windows Forms?
Events
Properties
Variables
Methods
Properties
What is the purpose of Windows Forms?
To design mobile apps.
To allow developers to create rich graphical applications for Windows OS.
To build web applications.
To manage databases.
To allow developers to create rich graphical applications for Windows OS.
A collection of classes.
methods
namespace
using
my college life
namespace
A ______________ tells the program that the current line of the statement has ended.
colon
programmer
semicolon
comma
semicolon
This typecasting is carried out automatically by the compiler.
implicit
explicit
magic
implicit
How do you define a class?
By putting the keyword "class" before the name of the class.
By putting the keyword "class" after the name of the class.
By saying "I define you!"
By putting the keyword "class" before the name of the class.
Which of the following is not an access modifier?
public
private
external
internal
external
In the following method, what is the method name?
public static void Main(String[ ] args)
String
void
Main
public void
Main
args in the the method statement means arrays.
TF
F
These are the special methods in a class
methods
constructors
class
constructors
These represent the behavior of an Object.
Fields
Properties
Methods
I am not sure, I will ask my cousin.
Fields
Which of the following is not a repetition statement?
do
foreach
while
goto
goto
Which of the following iteration constructs is most specialized for use with collections?
for
foreach
while
do
foreach
Which of the following iteration constructs evaluate their conditions after executing the statements they control?
do
while
foreach
for
do
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?
++i
i++
I--
I+-
i++
Which of the following keyword is used for including the namespaces in the program in C#?
class
namespace
using
none of the choices
using
Which of the following is correct about variable naming conventions in C#?
A name must begin with a letter that could be followed by a sequence of letters, digits (0-9) or underscore.
No embedded space or symbols such as - + ! @ # % ^ & * () {} [].
Both choices are correct.
Both choices are correct.
Which of the following converts a type to a 32-bit integer in C#?
A priest
ToDouble
ToInt16
ToInt32
ToInt32
Main Method statement ends with a semicolon.
TF
F
Which of the following is not an object of a class course?
IT101-1
IT111
CIS201
IT111L
CIS201
A loop becomes infinite loop if a condition never becomes true.
TF
F
Which of the following statement is correct to illustrate that an array named numbers can hold five integers?
int[ ] numbers = int[5]
int[ ] numbers = new int[5]
int numbers = new int[5] { 1, 2, 3, 4, 5};
int numbers = new int { 1, 2, 3, 4, 5};
int[ ] numbers = new int[5]
How can you access an element in an array?
By indexing the array name
By searching through the entire array
By using a for loop
By using the new keyword
By indexing the array name
What is a jagged array?
An array with a flexible size
An array with jagged edges
An array with random values
An array of arrays
An array of arrays
How can you assign values to an array at the time of declaration?
datatype[] arrayName = { value1, value2, ... };
datatype[][] arrayName = { value1, value2, ... };
datatype[] arrayName = new datatype[];
datatype arrayName = new datatype[];
datatype[] arrayName = { value1, value2, ... };
What does the Array Class provide?
A way to sort arrays
Properties and methods for working with arrays
A class for creating multi-dimensional arrays
An interface for creating arrays
Properties and methods for working with arrays
What happens when you create an array in C#?
The array elements remain uninitialized
You create a variable
Each array element is initialized to a default value
The array elements are set to random values
Each array element is initialized to a default value
What is an array used for?
To store a collection of data of the same type
To store a dynamic collection of data
To store a collection of data of different types
To say when you are physically hurt
To store a collection of data of the same type
What is a param array used for?
Passing unknown number of parameters to a function
Passing a fixed number of parameters to a function
Passing arrays to a function
When you are asking to borrow something
Passing unknown number of parameters to a function
How is an array declared in C#?
arrayName[][] = new datatype[];
datatype[][] arrayName;
datatype[] arrayName;
arrayName = new datatype[];
datatype[] arrayName;
What is a two-dimensional array?
An array with elements like avatar
An array with unknown number of dimensions
An array with two elements
A multidimensional array with two dimensions
A multidimensional array with two dimensions
Which of the following is not a data type in C#?
bool
int
sling
double
sling
What is the size of the double data type in C#?
4 bytes
Depends on the system architecture
16 bytes
8 bytes
8 bytes
A static method can access instance variables of a class directly.
TF
F
Which of the following is the correct syntax to declare a constant in C#?
int constant myValue = 10;
readonly int myValue = 10;
final int myValue = 10;
const int myValue = 10;
const int myValue = 10;
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);
}
10
15
5
compilation error
10
In C#, the decimal data type is used for financial and monetary calculations due to its higher precision than float or double.
TF
T
Which of the following is a correct way to implicitly convert a smaller type to a larger type?
int x = 10; long y = x;
int x = 10; long y = (int)x;
int x = 10; long y = (short)x;
int x = 10; long y = (long)x;
int x = 10; long y = x;
Which of the following is a reference type in C#?
object
bool
char
byte
object
What is the default return type of a method in C# that does not return any value?
null
int
string
void
void
What is the default value of elements in an integer array in C#?
0
1
undefined
null
0
Array elements can be of different data types.
TF
F
Which of the following correctly defines a method with parameters in C#?
public void MyMethod( ) int
public void MyMethod[ ]
public void MyMethod(int a, int b)
public void MyMethod(int a int b)
public void MyMethod(int a, int b)
What will be the result of the following expression?
int x = 10;
int y = 3;
int result = x % y;
0
2
3
1
1
A method can never have return statements.
TF
F
What is the value of the following boolean expression?
bool result = (5 > 3) && (3 < 2);
true
void
false
null
false
The ref keyword in a method allows a parameter to be passed by reference, enabling the method to modify the original value.
TF
T
Which of the following is true about method overloading in C#?
Let me call a friend to answer.
Method overloading allows multiple methods with the same name but different return types.
Method overloading is not supported in C#.
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.
What keyword is used to exit a method and return a value in C#?
exit
return
break
continue
return
Which of the following data types is used for a large range of floating-point numbers?
float
double
short
decimal
double
The float data type has higher precision than the double data type.
TF
F
What is the correct syntax to initialize an array of integers with the values 1, 2, 3, 4, 5?
int arr[ ] = [1, 2, 3, 4, 5];
int[ ] arr = {1, 2, 3, 4, 5};
int [ ] arr = [1, 2, 3, 4, 5];
int[ ] arr = new int(1, 2, 3, 4, 5);
int[ ] arr = {1, 2, 3, 4, 5};
Which of the following is the correct way to declare an integer array?
int[ ] arr = new int[5];
int arr [ ] = new int( );
int[ ] arr = new int(5);
int arr[ ] = new int[5];
int[ ] arr = new int[5];
How do you declare a two-dimensional array of integers?
int[,] arr = new int[3][3];
int[2] arr = new int[3][3];
int[][] arr = new int[3][3];
int[,] arr = new int[3, 3];
int[,] arr = new int[3, 3];