char c=a;
switch(c){
case a : Console.WriteLine("A") ;break;
default : Console.WtiteLine("Default");
}
What will happen if you attempt to compile and run code that includes this snippet?
A -
The code will compile and run nothing will be return on the standard output
B -
The code will compile and run and the letter "A" will be written to the standard ouput
C -
The code will not compile because the switch statement does not have legal expression
D -
The code will compile and run and the word "Default" will be written to the standard output
6-
Choose the right statement.
A -
The ComboBox control allows you to enter a vakue in the control, the ListBox control allows you to select only a single item from a list of predefined values
B -
The ComboBox control allows you to enter a vakue in the control, the ListBox control allows you to select multiple item from a list of predefined values
C -
The ComboBox control not allows you to enter a vakue in the control, the ListBox control allows you to select multiple item from a list of predefined values
D -
The ComboBox control allows you to enter a vakue in the control, the ComboBox control allows you to select only a single item from a list of predefined values
7-
C# code can be classified into types:
A -
Safe code
B -
All over above
C -
Unsafe code
D -
Managed code
8-
Class String and the Char structure found in the:
A -
System.Text namespace
B -
System namespace
C -
Sytem.Chars namespace
D -
System.Strings namespace
9-
class Test: Form { }
A -
Creates the class form that inherits the class Test
B -
Creates a new form with the name is Text
C -
Creates the class Test: Form
D -
Creates the class Test that inherits the class Form
10-
1. class Test{
2 public static void Main(){
3. int i=0;
4. char c= s;
5. object [ ] objArray=new object[3];
6. objArray[0] = new object();
7. objArray[0] = I;
8. objArray[0] = c; //new char();
9. }
10. }
The above code is compiled and run . The possible error is:
A -
The code will generate a compile time error at lines 7 and 8 as the arrasy can have only one type of data
B -
The code will generate a compile time error at lines 7 and 8 as the implicit conversion of int and char to a object type is not possible