Try C# .NET Junior
Try C# .NET Junior
com
Date:
1- Analyze what performance problem(s) exist in the following code and indicate a possible solution .
a)
b)
c)
return numbers;
}
sistran.com
www.sistran.com
2- Code tracking.
Console .WriteLine(s);
}
b) Indicate why this code may fail and how to solve it.
//Return the surname of the person if exists, else NULL private string GetSurnameFromDB( string idCard);
if (surname.Length > 0) {
description = surname + " " + idCard;
}
return description;
}
www.sistran.com
public C()
{}
}
b) In a class you can define 2 constructors with the same type and number of parameters.
A. TRUE
B. Fake
c) If you design a class that needs special initialization tasks, you will have to write a _____________
A. housekeeping routine
B. initializer
C. builder
D. Compiler
d) A method that does not return any value to the program defines the return value type as _______________
A. C# is not allowed
B. void
C. empty
D. sweep
www.sistran.com
SISTRAN
sistran.com
B. The methods allow programmers to break down large, complex problems into small, manageable
tasks.
f) The mechanism that consists of isolating an element from its context or from the rest of the elements
that accompany it is called ________
A. Selectivity
B. Polymorphism
C. Abstraction
D. Summary
g) What is an object?
www.sistran.com
sistran.com
4- SQL
BOOKS
IdBook NameBook Price Amount AuthorId IdG January
1. ."....... 1
SQL Server 2005 - Home 102.58 5 4
2 Gone With the Wind 97.12 8 2 3
3 Visual Basic .Net 2005 52.00 20 1 4
4 Dracula 204.98 15 NULL 2
5 Rich Father, Poor Father... 100.21 10 3 NULL
GENDERS
IdG January Description
i1 suspense
2 T error
3 Drama
4 Computing
5 Action
a) Perform an SQL query that returns the name of the books that cost more than $30 and have more than
10 books in stock.
Select *
from books l
inner join Genres g
on l . GenderId = g . GenderID
sistran.com
SISTRAN
to)
Price | Quantity |
IdBook NameBook AuthorId GenderID GenderID Description
b)
IdBook NameBook Price Amount AuthorId GenderID GenderID | Description
c)
IdBook NameBook Price Amount AuthorId GenderID GenderID Description