Which command can be used to list currently loaded kernel modules?

  • lsmod
  • modprobe
  • modinfo
  • insmod
The command 'lsmod' is used to list currently loaded kernel modules in Linux. This command displays a list of all the kernel modules that are currently loaded into the running kernel.

In Linux, the ________ command can be used to see who has been granted sudo access.

  • sudoers
  • whoami
  • visudo
  • su
In Linux, the visudo command is used to see who has been granted sudo access. This command opens the sudoers file in a safe manner for editing and displays the sudo configuration. It's important to use visudo to avoid syntax errors in the sudoers file, which could lock you out of administrative access.

Which system in Linux allows for the management and supervision of service daemons?

  • systemd
  • SysV init
  • GRUB
  • iptables
systemd is the system in Linux that allows for the management and supervision of service daemons. It's a modern initialization system and service manager that replaces the traditional SysV init. systemd provides enhanced control and monitoring of services and system initialization.

The _________ feature in btrfs allows for creating a readable/writable "snapshot" of a subvolume.

  • snapshot
  • backup
  • mirroring
  • subvolume copy
The correct option is snapshot. Btrfs, a modern file system for Linux, provides a feature that allows for creating a readable/writable "snapshot" of a subvolume. Snapshots are a powerful tool for data protection and efficient use of disk space.

In Linux, the _____ command is used to display the status of jobs in the current session.

  • jobs
  • top
  • ps
  • tasklist
In Linux, the jobs command is used to display the status of jobs in the current session. It provides information about background processes or jobs started within the current shell session.

The _________ command in Linux can be used to manipulate or display IP routing tables.

  • route
  • ifconfig
  • iptables
  • ip
The ip command in Linux can be used to manipulate or display IP routing tables. It's a powerful and versatile tool for configuring network interfaces, routes, tunnels, and more. Unlike older commands like route and ifconfig, ip is considered a modern and more comprehensive replacement.

You've encountered a do-while loop in a codebase which seems to execute one unnecessary iteration. What might be a possible reason for using do-while in this instance, and what could be an alternative solution?

  • The loop is used for input validation.
  • The loop is intended to run until a specific condition is met.
  • The loop is used for counting items in an array.
  • The loop is intended for asynchronous operations.
A common use of do-while loops is for input validation, ensuring that a specific task is performed at least once before checking the condition. The unnecessary iteration might occur because the loop is designed to prompt the user for input before evaluating the condition. An alternative solution could be to use a while loop with the condition checked before the loop, but it wouldn't guarantee at least one execution.

Imagine you're reading a book about the history of web development. The chapter on JavaScript mentions a language that was developed almost simultaneously and competed with JavaScript in the early days. What is the name of this language?

  • LiveScript
  • CoffeeScript
  • TypeScript
  • ActionScript
In the early days of web development, there was another language called "LiveScript" that was developed almost simultaneously with JavaScript. Although they had similar names, they were different languages. Eventually, LiveScript was renamed to JavaScript.

The mechanism that allows you to use the structure of a class and alter it for use in another class is known as _________.

  • Inheritance
  • Polymorphism
  • Encapsulation
  • Abstraction
The mechanism that allows you to use the structure of a class and alter it for use in another class is known as "Inheritance." Inheritance in JavaScript is achieved through the prototype chain, where a child class can inherit properties and methods from a parent class, allowing for code reuse and extension.

What does the keyword "new" do in JavaScript?

  • Creates a class
  • Declares a variable
  • Instantiates an object
  • Defines a function
The keyword "new" in JavaScript is used to instantiate an object from a class constructor. When you use "new" followed by a class constructor, it creates a new instance of that class, allowing you to work with objects that have the properties and methods defined in the class. It doesn't create a class, declare a variable, or define a function.