WorksheetsProject Associate fresher Software Development
Total questions: 50
Worksheet time: 25mins
Q1. Which answer is NOT a type of table index?
nonclustered
unique
heap
hash
Q2. The keywords AND, IN, LIKE, and BETWEEN belong to a category called what?
joining operations
linking operations
criteria operations
logical operations
Q3. What is the result of this series of statements?
sql
Copy
BEGIN TRY
SELECT 'Foo' AS Result;
END TRY
BEGIN CATCH
SELECT 'Bar' AS Result;
Foo
FooBar
Foo Bar
Bar
Q4. Which query generates a listing showing student names and department office
locations?
SELECT Students.first_name, Students.last_name,
Departments.office_location FROM Students, Departments;
SELECT Students.first_name, Students.last_name,
Departments.office_location FROM Students JOIN Departments ON
Students.department = Departments.department;
SELECT Students.first_name, Students.last_name,
Departments.office_location FROM Students JOIN Departments;
SELECT Students.first_name, Students.last_name,
Departments.office_location FROM Students ON Students.department =
Departments.department;
Q5. What is an example of a DDL command in SQL?
TRUNCATE TABLE
DELETE
MERGE
DROP
Q6. What is the result of SELECT FLOOR(-1234.321)?
-1234.3
-1234
-1235
1234.321
Q7. Which data type is an approximate numeric?
real
bit
decimal
numeric
Q8. What is the result of SELECT 1 / 2 AS Result?
0.5
error
0
1
Q9. Which data type efficiently stores a person's age in years?
float
int
tinyint
bigint
Q10. What is the result of SELECT 'abc\ def' AS Result?
abc\def
abcdef
error
abc def
Q11. How do you select a random student from a table?
SELECT TOP(1) first_name, last_name FROM Students ORDER BY
NEWID();
SELECT TOP(1) RAND(first_name, last_name) FROM Student;
SELECT TOP(1) first_name, last_name FROM Student;
SELECT TOP(1) first_name, last_name FROM RAND(Student);
Q12. What is the result of SELECT 123 + '123' AS Result?
123'123'
error
246
123123
Q13. Which keyword combines SELECT statements, removing duplicates?
DEDUPE
SELECT
MERGE
UNION
Q14. What does a RIGHT JOIN ensure?
Only records from the rightmost table are displayed.
All records from the rightmost table are represented, even without matches.
Records from the rightmost table are displayed only if they match the left table.
No records from the rightmost table are displayed if unmatched.
Q15. Which statement removes all data from a table but keeps the schema?
TRUNCATE TABLE Students;
DELETE FROM Students;
DROP TABLE Students;
REMOVE * FROM Students;
Q16. What is the result of SELECT 123 + 'abc' AS Result?
123abc
error
'123abc'
123'abc'
Q17. Which statement creates a new database schema named Sales with Sharon as
the owner?
ALTER USER Sharon WITH DEFAULT_SCHEMA = Sales;
CREATE SCHEMA Sales AUTHORIZATION Sharon;
ALTER USER Sharon SET SCHEMA Sales;
CREATE SCHEMA Sales SET OWNER Sharon;
Q18. How many rows result from a CROSS JOIN between tables with 4 and 5 rows?
1024
20
0
9
Q19. Which WHERE clause finds SerialNumber ending with "10_3"?
WHERE SerialNumber LIKE '%10_3'
WHERE SerialNumber LIKE '%10[__]3'
WHERE SerialNumber LIKE '%10"__"3'
WHERE SerialNumber LIKE ('%10'+"__"+'3')
Q20. What is the default join type if not specified?
INNER
RIGHT
LEFT
FULL
Q21. How many bytes does the int data type consume?
1
2
4
8
Q22. Which statement deletes the Inventory table from the Products database?
DROP TABLE Products.Inventory;
USE Products; DROP TABLE Inventory;
USE Products; DELETE Inventory;
USE Products.Inventory; DROP TABLE Inventory;
Q23. Which clause must accompany TOP to predictably indicate affected rows?
GROUP BY
HAVING
WHERE
ORDER BY
Q24. Which data type stores dates with time zone information?
datetimeoffset
smalldatetime
datetime
datetime2
Q25. What is the result of SELECT 123 + '123' AS Result?
123'123'
error
246
123123
Q26. Which operator returns true if two compared values are not equal?
<>
!==
==!
--
Q27. How is forEach different from for?
Only for uses a callback.
forEach is mainly for arrays; for is generic.
Only forEach lets you specify an iterator.
forEach is generic; for is only for arrays.
Q28. What is the output of console.log(typeof 42)?
'float'
'value'
'number'
'integer'
Q29. Which method converts JSON to a JavaScript object?
JSON.fromString()
JSON.parse()
JSON.toObject()
JSON.stringify()
Q30. What is the output of [] == []?
true
false
undefined
error
Q31. Which variable-defining keyword allows hoisting?
let
const
var
All of them
Q32. What is the output of console.log(y) if const y = x ? 'One' : 'Two' and
const x = 6 % 2?
'One'
'Two'
undefined
error
Q33. Which collection allows unique values only?
Object
Set
Array
Map
Q34. What is the output of console.log([...'hello'])?
['h', 'e', 'l', 'l', 'o']
'hello'
error
['hello']
35. What will "Hello".charAt(1) return?
H
e
l
o
36. Which keyword is used to prevent a method from being overridden?
static
final
const
private
37. What is the default value of a boolean in Java?
true
false
0
null
38. Which operator is used for bitwise AND in Java?
&
&&
|
^
39. What will 5 / 2 evaluate to in Java?
2.5
2
3
2.0
40. What does Math.ceil(4.2) return?
4
5
4.2
3
41. How do you declare an abstract method?
public abstract void method();
public void method() {}
public void abstract method();
public abstract method() {}
42. What does s.equalsIgnoreCase("Hello") return if s = "hello"?
true
false
null
Error
43. What will "hello".length() return?
4
5
6
Error
44. How do you create an instance of a class named Car?
Car car();
new Car();
Car = new Car();
Car car = new Car();
45. What will System.out.println(3 == 3.0); print?
true
false
Error
Null
46. What will Integer.parseInt("123") return?
123
"123"
Error
Null
47. How do you correctly define a main method in Java?
public static void main()
public static void main(String args)
public static void main(String[] args)
void main(String[] args)
48. Which collection does not allow duplicate elements?
List
ArrayList
Set
Queue
49. What is the size of an int in Java?
2 bytes
4 bytes
8 bytes
Depends on system
50. Which of these is a wrapper class?
int
double
Integer
void
