-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquiz.json
308 lines (308 loc) · 8.74 KB
/
quiz.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
[
{
"topic": "Linux",
"question": "What is the command to list all files and directories in the current directory?",
"answer_options": ["ls", "pwd", "cd", "touch"],
"correct_answer": "ls"
},
{
"topic": "Linux",
"question": "What is the command to change the current working directory?",
"answer_options": ["chdir", "cd", "pwd", "ls"],
"correct_answer": "cd"
},
{
"topic": "Linux",
"question": "What is the command to create a new directory?",
"answer_options": ["mkdir", "touch", "rm", "cp"],
"correct_answer": "mkdir"
},
{
"topic": "Linux",
"question": "What is the command to remove a file?",
"answer_options": ["rm", "rmdir", "mv", "cp"],
"correct_answer": "rm"
},
{
"topic": "Linux",
"question": "What is the command to remove a directory?",
"answer_options": ["rmdir", "rm", "mv", "cp"],
"correct_answer": "rmdir"
},
{
"topic": "Linux",
"question": "What is the command to copy a file?",
"answer_options": ["cp", "mv", "rm", "rmdir"],
"correct_answer": "cp"
},
{
"topic": "Linux",
"question": "What is the command to move a file?",
"answer_options": ["mv", "cp", "rm", "rmdir"],
"correct_answer": "mv"
},
{
"topic": "Golang",
"question": "Which of the following is NOT a valid way to create a new slice?",
"answer_options": [
"var s []int",
"s := make([]int)",
"s := []int{1, 2, 3}",
"s := []int"
],
"correct_answer": "s := []int"
},
{
"topic": "Golang",
"question": "Which of the following is the correct way to create a new channel?",
"answer_options": [
"var c chan int",
"c := make(chan int)",
"c := chan int{}",
"c := chan int"
],
"correct_answer": "c := make(chan int)"
},
{
"topic": "Golang",
"question": "Which of the following is the correct way to create a new map?",
"answer_options": [
"var m map[string]int",
"m := make(map[string]int)",
"m := map[string]int{}",
"m := map[string]int"
],
"correct_answer": "m := make(map[string]int)"
},
{
"topic": "Golang",
"question": "Which of the following is NOT a valid way to create a new struct?",
"answer_options": [
"var s struct{}",
"s := make(struct{})",
"s := struct{}{}",
"s := struct{}"
],
"correct_answer": "s := make(struct{})"
},
{
"topic": "Golang",
"question": "Which of the following is NOT a valid way to create a new function?",
"answer_options": [
"func f() {}",
"var f func()",
"f := make(func())",
"f := func(){}"
],
"correct_answer": "f := make(func())"
},
{
"topic": "Golang",
"question": "What is the correct syntax for a for loop in Golang?",
"answer_options": [
"for i := 0; i < 10; i++ {}",
"for i = 0; i < 10; i++ {}",
"for (i = 0; i < 10; i++) {}",
"for i in 0..10 {}"
],
"correct_answer": "for i := 0; i < 10; i++ {}"
},
{
"topic": "Golang",
"question": "What is the correct syntax for an if statement in Golang?",
"answer_options": [
"if x > 0 {}",
"if (x > 0) {}",
"if x > 0 then {}",
"if x > 0 {} else {}"
],
"correct_answer": "if x > 0 {}"
},
{
"topic": "Git",
"question": "What is the correct command to add all changes to the staging area?",
"answer_options": ["git add", "git commit", "git push", "git pull"],
"correct_answer": "git add"
},
{
"topic": "Git",
"question": "What is the correct command to commit changes?",
"answer_options": ["git commit", "git add", "git push", "git pull"],
"correct_answer": "git commit"
},
{
"topic": "Git",
"question": "What is the correct command to push changes to a remote repository?",
"answer_options": ["git push", "git add", "git commit", "git pull"],
"correct_answer": "git push"
},
{
"topic": "Git",
"question": "What is the correct command to pull changes from a remote repository?",
"answer_options": ["git pull", "git add", "git commit", "git push"],
"correct_answer": "git pull"
},
{
"topic": "Git",
"question": "What is the correct command to view the commit history?",
"answer_options": ["git log", "git status", "git diff", "git show"],
"correct_answer": "git log"
},
{
"topic": "Git",
"question": "What is the correct command to view the changes in the working directory?",
"answer_options": ["git diff", "git log", "git status", "git show"],
"correct_answer": "git diff"
},
{
"topic": "Git",
"question": "What is the correct command to view the status of the working directory and staging area?",
"answer_options": ["git status", "git diff", "git log", "git show"],
"correct_answer": "git status"
},
{
"topic": "Git",
"question": "What is the correct command to view the changes in a commit?",
"answer_options": ["git show", "git diff", "git log", "git status"],
"correct_answer": "git show"
},
{
"topic": "Git",
"question": "What is the correct command to switch to a different branch?",
"answer_options": [
"git switch",
"git checkout",
"git branch",
"git merge"
],
"correct_answer": "git checkout"
},
{
"topic": "Git",
"question": "What is the correct command to create a new branch?",
"answer_options": [
"git new",
"git create",
"git branch",
"git merge"
],
"correct_answer": "git branch"
},
{
"topic": "Git",
"question": "What is the correct command to merge changes from one branch into another?",
"answer_options": [
"git merge",
"git new",
"git create",
"git branch"
],
"correct_answer": "git merge"
},
{
"topic": "Golang",
"question": "Which of the following is NOT a valid way to create a new interface?",
"answer_options": [
"var i interface{}",
"i := make(interface{})",
"i := interface{}{}",
"i := interface{}"
],
"correct_answer": "i := make(interface{})"
},
{
"topic": "Golang",
"question": "Which of the following is NOT a valid way to create a new function?",
"answer_options": [
"func f() {}",
"var f func()",
"f := make(func())",
"f := func(){}"
],
"correct_answer": "f := make(func())"
},
{
"topic": "Golang",
"question": "What is the correct syntax for a switch statement in Golang?",
"answer_options": [
"switch x { case 0: case 1: }",
"switch { case x == 0: case x == 1: }",
"switch x { case 0; case 1; }",
"switch { case x = 0; case x = 1; }"
],
"correct_answer": "switch x { case 0: case 1: }"
},
{
"topic": "Golang",
"question": "What is the correct syntax for a type assertion in Golang?",
"answer_options": ["x.(T)", "(T)x", "x as T", "x is T"],
"correct_answer": "x.(T)"
},
{
"topic": "Golang",
"question": "What is the correct syntax for a type switch in Golang?",
"answer_options": [
"switch x.(type) { case int: case string: }",
"switch type(x) { case int: case string: }",
"switch x { case int: case string: }",
"switch (type)x { case int: case string: }"
],
"correct_answer": "switch x.(type) { case int: case string: }"
},
{
"topic": "Golang",
"question": "What is the correct syntax for a select statement in Golang?",
"answer_options": [
"select { case <-c: }",
"select c { case <-c: }",
"select { case c <-: }",
"select <-c { case c: }"
],
"correct_answer": "select { case <-c: }"
},
{
"topic": "Golang",
"question": "What is the correct syntax for a go statement in Golang?",
"answer_options": ["go f()", "go f", "f() go", "f go"],
"correct_answer": "go f()"
},
{
"topic": "Golang",
"question": "What is the correct syntax for a deferred function call in Golang?",
"answer_options": ["defer f()", "defer f", "f() defer", "f defer"],
"correct_answer": "defer f()"
},
{
"topic": "Golang",
"question": "What is the correct syntax for a return statement in Golang?",
"answer_options": [
"return x",
"return (x)",
"return x;",
"return (x);"
],
"correct_answer": "return x"
},
{
"topic": "Golang",
"question": "What is the correct syntax for a for range loop in Golang?",
"answer_options": [
"for i, v := range x {}",
"for i, v in x {}",
"for (i, v) in x {}",
"for i, v of x {}"
],
"correct_answer": "for i, v := range x {}"
},
{
"topic": "Golang",
"question": "What is the correct syntax for a type definition in Golang?",
"answer_options": [
"type T struct{}",
"struct T{}",
"type T {}",
"struct{} T"
],
"correct_answer": "type T struct{}"
}
]