CPT Test
CPT Test
```python
def func(x, y=[]):
y.append(x)
return y
print(func(1))
print(func(2))
```
a) [1] [2]
b) [1, 2] [1, 2]
c) [1] [1, 2]
d) [1, 2] [2]
2. 2. Which data structure does `set()` represent and what is its main property?
a) List; ordered
b) Dictionary; key-value pairs
c) Set; unordered with no duplicates
d) Tuple; immutable
Answer: a) True
Answer: c) 17
5. Which of these is the correct way to define a pointer to an integer in C++?
a) int* p;
b) pointer<int> p;
c) int p*;
d) int pointer p;
Answer: a) int* p;
Answer: b) value_1
Answer: c) Tuple
10. Which keyword is used in C++ to create a constant value?
a) const
b) final
c) static
d) immutable
Answer: a) const