Pre-Finals (Elixir) Flashcards

Elixir, LOGO, Ada 95, COBOL, PROLOG, F# (19 cards)

1
Q

What is the file extension for Elixir source files that are compiled?

A

.ex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which Elixir primitive enables a subprogram to run concurrently in a separate process?

A

spawn/1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What operator prevents variable rebinding during pattern matching?

A

^ (pin operator)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What Elixir construct allows multi-way selection and uses pattern matching to determine which branch to execute?

A

case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Name the virtual machine that runs Elixir programs

A

BEAM (Erlang Virtual Machine)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

True or False:
In Elixir, variables are mutable by default, allowing values to be directly changed in memory

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The MapSet module in Elixir is used to manage collections of unique values and supports operations like union, intersection, and difference

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The ++ and – operators modify the original list in-place when concatenating or subtracting elements

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In Elixir, the do … end keywords are used to delimit code blocks instead of curly braces
{}.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the output of the program?

a=3
b=7
c=10

{[x, y], z} = {[b, a], c}
x = x* 2
y = y+z
z =z+y

IO.inspect({x, y, z})

A

{14, 13, 23}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Who created Elixir and Co-founder of Plataformatec

A

José Valim

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Company known for its work in the Ruby and Rails Ecosystem

A

Plataformatec

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

This is a dynamic, functional programming language designed for building systems in need of ____, ____, and ____

A

High Concurrency
Scalability
Reliability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Elixir is widely used in where? (Application Areas)

A

telecommunications platforms
financial systems
cloud-native architectures
IoT backends
distributed systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Characteristics

A
  1. Functional programming paradigm
  2. Highly concurrency-oriented
  3. Fault-tolerant and follows “let it crash” philosophy
  4. Dynamic typing
  5. Garbage collection
  6. Pattern matching
  7. Strong support for scalability
  8. Hot code swapping
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What philosophy does Elixir follow?

A

Let it crash.
Allowing systems to recover gracefully from failures

17
Q

What is a pipe operator?

A

Used to pass the result of the expression on its left as the first argument to the function on its right.

18
Q

What are atoms?

A

Atoms are constants where the name itself is the value

19
Q

Does Elixir support goto statements? if so, why?

A

No. As these are incompatible with its functional design and scoping rules.

Transfer of control are achieved implicitly through function invocation