SQL TEST - C# (Developer)
SQL TEST - C# (Developer)
The code that populates the array is already written, but you can edit it to try other
values. With the refresh button you can recover the original value that will be used
to evaluate the question as correct or incorrect during execution.
Your program written in C# must parse the array from left to right so that in case
two numbers meet the condition, the one that appears first from left to right will
be the one that will be printed. The data output for the array in the example
(1,2,2,5,4,6,7,8,8,8) would be as follows:
Longest: 3
Number: 8
In the example, the longest sequence is the number 8 with a sequence of three
eights in a row. Please note that the code you write must print the results exactly
as shown in order for the question to be considered valid.
The code to declare and populate myArray is already there, you can edit it to test
with other values and you can click the update button next to it to return to the
original value that will be used to validate your code during testing.
Answer:
Calle 113 # 7 – 21 Tower A Floor 15
Teleport Business Park Building
PBX 6292529 FAX: 6292529 Ext. 165
Bogotá DC
www.bolsamercantil.com.co
129
253
515
You need to find the path that produces the lowest number by adding the values
of each number you visit. So, for the example, the path with the smallest sum
would be 1,2,3
The code to declare and populate myArray is already there, you can edit it to test
with other values and you can click the update button next to it to return to the
original value that will be used to validate your code during testing.
The result of your program should be the 3 numbers you go through to get the
smallest sum separated by a space. For the example, the output would be exactly
like this:
123
Answer:
a) Convert.Int
b) Int64.Conversion
c) ToInteger64
d) ToInt64
a) ToInt64
b) Type validation is done at runtime
c) The first two are true
d) They are all fake
6. Which of the following data structures does not exist natively in C#?
a) Arrangement
b) Multi-dimensional Array
c) Binary tree
d) stack
7. What class can you use to define a structure that you can access by string index?
a) Collection
b) StringArray
c) DataSet
d) array
e) X Dictionary
8. What is the Using statement used for in C#? Check those that apply.
a) Dictionary
b) Allows you to define which variables are going to be used in a protected method.
c) None of the above.
a) Rank
Calle 113 # 7 – 21 Tower A Floor 15
Teleport Business Park Building
PBX 6292529 FAX: 6292529 Ext. 165
Bogotá DC
www.bolsamercantil.com.co
b) TotalLength
c) Length
d) GetLength
11. If a C# executable file is run many times, multiple processes are spawned. Why
only one of them is executed at a time, what instruction can be used?
a) Mutex
b) Semaphore
c) Critical Section
d) C# Lock
a) MODIFY
b) SETTER
c) CHANGE
d) UPDATE
e) INSERT
2. Which of the following statements will delete the record with id equal to 5 from
the employee table?
a) ALTER TABLE
b) NEW TABLE
c) CREATE TABLE
d) ADD TABLE
4. Obtain using an SQL query the first and last name (firstname and lastname) for the
employee with id equal to 3.
Boards:
APPX_employee (id, firstname, lastname, department_id, salary,
educationlevel_id)
APPX_department (id, description, department_city)
APPX_educationlevel (id, description)
Answer:
5. Using an SQL query, obtain the firstname, lastname and salary for employees with
a salary greater than or equal to 50000 and less than or equal to 100000. Show
results sorted by name in ascending order.
Boards:
APPX_employee (id, firstname, lastname, department_id, salary,
educationlevel_id)
APPX_department (id, description, department_city)
Calle 113 # 7 – 21 Tower A Floor 15
Teleport Business Park Building
PBX 6292529 FAX: 6292529 Ext. 165
Bogotá DC
www.bolsamercantil.com.co
Answer:
6. Using an SQL query, obtain the list of departments that have 2 or more employees.
Indicate the name of the department (department_name field) and the number of
employees, ordered by the department name in ascending order.
Boards:
APPX_employee (id, firstname, lastname, department_id, salary,
educationlevel_id)
APPX_department (id, department_name, department_city)
APPX_educationlevel (id, description)
Answer:
7. Obtain, using an SQL query, the list of people and their level of education for
people who work in departments where the sum of the salaries of the employees
who make them up is greater than 250,000. In the list, show the person's last
name (lastname) and the educational level (description of the educationlevel
table). Show results sorted by last name.
Boards:
APPX_employee (id, firstname, lastname, department_id, salary,
educationlevel_id)
APPX_department (id, department_name, department_city)
APPX_educationlevel (id, description)
Answer:
Calle 113 # 7 – 21 Tower A Floor 15
Teleport Business Park Building
PBX 6292529 FAX: 6292529 Ext. 165
Bogotá DC
www.bolsamercantil.com.co