---
# System prepended metadata

title: Software Engineer Assessment
tags: [Assessment]

---

# Software Engineer Assessment

###### tags: `Assessment`

> Just play, have fun & enjoy  :brain: :video_game: :rainbow: 

[toc]


##  Logic Questions

1. Before Mt. Everest was discovered, what was the tallest mountain in the world?
2. A cow weighs 800 kilograms, and the weight load of the bridge is 700 kilograms, how does the cow cross the bridge?
3. What is the largest possible number you can write using only 2 numbers - just 2 numbers, no other mathematical symbols?
4. There are 3 light bulbs in a hidden room and 3 switches outside the room that correspond to those light bulbs. You do not know which switch affects which bulb and you cannot see inside of the room. You are allowed to go inside of the room only one time. How do you find out which switch corresponds to which bulb?
5. You have two sand timers, which can show 4 minutes and 7 minutes respectively. Use both the sand timers (at a time or one after other or any other combination) and measure a time of 9 minutes.
6. A snail is at the bottom of a 30 foot well. Every hour the snail is able to climb up 3 feet, then immediately slide back down 2 feet. How many hours does it take for the snail to get out of the well?


## Object Oriented Programming Corner

7. What is object-oriented programming?
8. What are the basic concepts of OOPS.
9. What is the difference between class and an object?
10. Write a function that will return 3 possible values, Success, Pending, Failed. Write the code in any language.
11. Initially, write a function that receive a string. At later stage, the same function is required to receive 2 parameters, 1 is number and 1 is DateTime. And later stage the number of parameters may be changed again. Write the snippet for this in the language that you are comfort with.
12. Write a function named GetUserSummary that return Name & Age, another function named GetUserDetail that return Name, Age, BirthDate, Gender. Write the code in any language.
13. Given an array of ints, write a method to total all the values that are even numbers. (Can be any OOP language)


## SQL Corner

14. What is the difference between DELETE and TRUNCATE?
15. What does UNION do? What is the difference between UNION and UNION ALL?
16. What is the difference between IN and EXISTS?
17. What will be the result of the query below? Explain your answer and provide a version that behaves correctly.
18. select case when null = null then 'Yup' else 'Nope' end as Result;
19. How do you copy data from one table to another table?


## Web Development Questions

20. What’s the difference between GET and POST methods in HTTP requests?
21. List out the different ways of CSS code to style below html element highlighted in RED.**
```
<p>This paragraph refers to two classes. </p>
```
22. List out the different ways an HTML element can be accessed in a JavaScript code.
23. What would be the result of 2+5+”3” in JavaScript?
24. What will be the output when the following code is executed? Explain.
 ```
console.log(false == '0')
console.log(false === '0')
```
25. In what order will the numbers 1-4 be logged to the console when the code below is executed? Why?
```
(function() {
    console.log(1); 
    setTimeout(function(){console.log(2)}, 1000); 
    setTimeout(function(){console.log(3)}, 0); 
    console.log(4);
})();
```
26. What would the following lines of code output to the console? Explain your answer.
```
console.log("0 ||  1 = "+(0 || 1));
console.log("1 || 2 = "+(1 || 2));
console.log("0 && 1 = "+(0 && 1));
console.log("1 && 2 = "+(1 && 2));
```



## 回答方式
請另開一份 hackmd 記錄下題目以及答案
提供給 HR hackmd 的連結以供審查




