Question 1. What Is Elixir?
Answer :
Elixir is a dynamic, functional language. It is designed to build scalable and maintainable applications.
Question 2. Who Developed Elixir?
Answer :
Ericsson developed elixir in 1986.
Question 3. What Is The Stable Version Of Elixir?
Answer :
The stable version of Elixir is 1.5.1 and released on 1 August 2017.
Question 4. What Are The Features Of Elixir?
Answer :
The following features of Elixir are:
- Scalability
- Fault tolerance
- Functional programming
- Build tools
- Erlang Compatibility
Question 5. Which Platform Is Used To Run Elixir?
Answer :
BEAM (Erlang virtual machine) platform is used to run Elixir.
Question 6. What Is The Use Of Spawn Functions?
Answer :
The Spawn function is used to create a new process.
Example:
pid = spawn(fn -> 2 * 2 end)
Process.alive?(pid)
Question 7. What Is Sigils In Elixir?
Answer :
Elixir is a mechanism, used to textual representations with the language. It starts with tilde (~) character.
Question 8. How To Create A Map In Elixir??
Answer :
Map is created by using %{} syntax.
map = %{:a => 1, 2 => :b}
Question 9. What Are The Operators In Elixir?
Answer :
There are following operators in Elixir:
- Arithmetic operators
- Comparison operators
- Boolean operators
- Misc operators
Question 10. What Do You Mean By String Interpolation In Elixir?
Answer :
String interpolation is a way to construct a new String value. The code is wrap with curly braces and ‘#’ sign.
Example:
x = “Apocalypse”
y = “X-men #{x}”
IO.puts(y)
Question 11. What Is The Use Of Crypto Module In Elixir?
Answer :
In Elixir, the crypto module is used to decrypt our project applications. It uses hashing function and digital signature.
Example:
IO.puts(Base.encode16(:crypto.hash(:sha256, “Elixir”)))
Question 12. How Can We Define Structs?
Answer :
We can define Structs by using defstruct
iex> defmodule User do
…> defstruct name: “John”, age: 27
…> end
Question 13. What Is Match Operator In Elixir?
Answer :
In elixir, = operator is match operator.
Example:
iex> x = 1
1
iex> x
1
Python Interview Questions
Python Tutorial
J2EE Interview Questions
J2EE Tutorial
Core Java Interview Questions
PostgreSQL Interview Questions
Core Java Tutorial
Ubuntu Certified Professional Interview Questions
Python Interview Questions
Node.js Tutorial