Escolar Documentos
Profissional Documentos
Cultura Documentos
2. Is C# case sensitive?
Da.
3. How does a multiline comment look like?
/* comment 1
Comment 2
*/
4. Give 5 example of reserved keywords.
Using, if, while, for, object
5. Identify the mistakes in the following code:
void class Shape
{
public int Lines{get;set;}
void Name{get;set;}
7. What would be
the output of
the following
code?
75
53
234.57652
True
00000000-00000000-0000000000000000
Valoarea default
a Globally Unique Identifier.
13.What does this mean: var b = a ?? c;
B ia valoarea A, daca a nu este null, in caz contrar ia valoarea lui C.
14.Write a class that performs mathematical operations with big numbers. Do
operations on strings. Do not use System.Numbers.BigNumber. The class
will have the following methods:
a. string Add(string a, string b);
b. string Substract(string a, string b)
c. string Multiply(string a, string b)
d. string Divide(string a, string b)
15.Write a function that returns a two-dimensional array where each cell is an
integer representing the product between its position on row and column.
For example: a[2, 3] = 6
16.Write a class that receives in its constructor an array of string objects.
Write the following functions for this class:
a. A function that returns the concatenated strings as one string.
b. A function that returns the total number of characters in all strings.
c. A function that returns the total distinct characters in all strings.
d. A function that, given a string S, returns that string replacing the
letters a, A, b, B with the letter X.
17.What is an enum?
Enum este un cuvant cheie folosit pentru a declara o enumerare. Consta
intr-o lista de constante;
18.What is the purpose of a static function?
Poate fi accesata chiar daca nu a fost creata o instanta a clasei. Functia
este apelata cu numele clasei, nu cu o instanta a sa. Exista o singura copie
a functiei.
19.What is an interface?