Chapt 20 Flashcards
Which statement about scripting languages is true?
A) Scripting languages require a compiler.
B) Scripting languages are strongly typed.
C) Scripting languages are interpreted.
D) Scripting languages have good memory management.
Scripting languages are interpreted.
C. Scripting languages are interpreted languages that run on top of a runtime environment. Programming languages, not scripting languages, require a compiler. Scripting languages are not strongly typed; programming languages are strongly typed. Scripting languages have bad memory management because of loosely typed variables.
What level are scripting languages considered?
A) High
B) Mid
C) Intermediate
D) Low
High
A. Scripting languages are considered high‐level languages because they do not directly access hardware and use an intermediary called the interpreter. Mid‐level languages are Java and C/C++, not scripting languages. There is no such thing as an intermediate‐level language. Low‐level languages are machine language and assembly language, which are not scripting languages.
Which type of variable will allow decimal math?
A) Boolean
B) Integer
C) Floating‐point
D) String
Floating‐point
C. Floating‐point variables allow for precision math, also known as decimal math. Boolean variables allow for true or false values. Integer variables allow for whole numbers values. String variables allow for text values.
Which environment variable is not inherited?
A) System variable
B) User variable
C) Program variable
D) String variable
Program variable
C. A program variable is the least significant and not inherited. A system variable is defined for the entire system and is the most significant because it is inherited by all users and programs. A user variable is significant as well, since all applications inherit the variable. A string variable is not inherited, but it is not an environment variable.
Which statement will load a PowerShell variable xvar with a value of 2?
A) xvar = 2
B) $xvar = 2
C) xvar = 2;
D) set /a xvar=2
$xvar = 2
B. The statement $xvar = 2 is a PowerShell statement that will load the variable xvar with a value of 2. The statement xvar = 2 is Bash syntax. The statement xvar = 2; is JavaScript syntax. The statement set /a xvar=2 is Windows batch script syntax.
Which type of loop has a defined beginning and end, and steps from beginning to end?
A) do while loop
B) while loop
C) if statement
D) for loop
for loop
D. A for loop has a defined beginning and end, and steps from the beginning to the end. A do while loop is a type of while loop and has only a defined end. A while loop has only a defined end. An if statement is branch logic, not a loop.
Which extension is used with the Windows batch scripting language?
A) .vbs
B) .js
C) .bat
D) .py
.bat
C. The .bat extension is used with the Windows batch scripting language. The .vbs extension is used with VBScript language. The .js extension is used with the JavaScript scripting language. The .py extension is used with the Python scripting language.
Which scripting language allows for the use of the Component Object Model (COM)?
A) PowerShell
B) VBScript
C) Windows batch script
D) JavaScript
VBScript
B. The VBScript language allows for the use of the Component Object Model (COM). The PowerShell scripting language allows for the use of the .NET Framework. Windows batch scripts use existing applications. JavaScript is primarily web browser–based and does not allow for the use of external objects.
Which extension is used with the Python scripting language?
A) .vbs
B) .js
C) .bat
D) .py
.py
D. The .py extension is used with the Python scripting language. The .vbs extension is used with the VBScript language. The .js extension is used with the JavaScript scripting language. The .bat extension is used with the Windows batch scripting language.
Which scripting language is used with Microsoft Azure and Microsoft 365?
A) PowerShell
B) VBScript
C) Windows batch script
D) JavaScript
PowerShell
A. The PowerShell scripting language allows for the use of the .NET Framework and is commonly used with Microsoft Azure and Microsoft 365. The VBScript language allows for the use of the Component Object Model (COM) and is not used for cloud services. Windows batch script uses existing applications and is not used for cloud services. JavaScript is primarily web browser–based, does not allow for the use of external objects, and is not used for cloud services
Which scripting language is used within web pages to allow for interactive content?
A) PowerShell
B) Bash
C) Windows batch script
D) JavaScript
JavaScript
D. JavaScript is primarily web browser–based and allows for interactive content. The PowerShell scripting language is used to manage the operating system. The Bash scripting language is primarily used with Linux and UNIX systems. Windows batch scripts use existing applications and are used to manage the operating system.
Which extension is used with the Bash scripting language?
A) .vbs
B) .sh
C) .bat
D) .py
.sh
B. The .sh extension is used with the Bash scripting language. The .vbs extension is used with the VBScript language. The .bat extension is used with the Windows batch scripting language. The .py extension is used with the Python scripting language.
What must be done before a Bash script can be executed?
A) chown permissions must be set.
B) The execute attribute must be set.
C) chmod permissions must be set.
D) An .sh must be added to the end of the script.
chmod permissions must be set.
C. Before a script can be executed, you must use the chmod command to grant execute permissions. The chown command changes ownership. There is no such thing as an execute attribute. Adding .sh to the end of the script doesn’t serve any purpose.
Which statement will load a JavaScript variable mvar with a value of 8?
A) $mvar = 8
B) mvar = 8
C) mvar = 8;
D) set /a mvar=8
mvar = 8;
C. The statement mvar = 8; is JavaScript syntax to load a variable of mvar with a value of 8. The statement $mvar = 8 is PowerShell syntax. The statement mvar = 8 is Bash syntax. The statement set /a mvar=8 is Windows batch script syntax.
Which scripting language has its own preinstalled Integrated Scripting Environment (ISE)?
A) VBScript
B) Bash
C) Python
D) PowerShell
PowerShell
D. PowerShell is the only scripting language that has a preinstalled Integrated Scripting Environment (ISE), called the PowerShell ISE. The VBScript language requires the installation of Microsoft Visual Studio Code. The Bash scripting language requires a text editor or other package to be installed. The Python scripting language requires a third‐party integrated development environment (IDE), also known as an ISE.
Which line would be used to comment JavaScript code?
A) //comment
B) ‘comment
C) REM comment
D) # comment
//comment
A. The line //comment is used to comment JavaScript code. The line ‘comment is used to comment VBScript code. The line REM comment is used to comment Windows batch script code. The line # comment is used to comment Bash script code and PowerShell code.
Which extension is used with the JavaScript scripting language?
A) .js
B) .sh
C) .bat
D) .py
.js
A. The .js extension is used with the JavaScript scripting language. The .sh extension is used with the Bash scripting language. The .bat extension is used with the Windows batch scripting language. The .py extension is used with the Python scripting language.
Which Microsoft remote protocol allows for local drives to be presented to the remote system?
A) VCN
B) RDP
C) SSH
D) Telnet
RDP
B. Remote Desktop Protocol (RDP) allows for local drives to be available to the remote machine when an RDP session is initiated. Virtual Network Computing (VNC), Secure Shell (SSH), and Telnet are not capable of redirecting drives.
On which network protocol and port does SSH operate?
A) TCP port 3389
B) TCP port 22
C) TCP port 23
D) TCP port 443
TCP port 22
B.
The SSH protocol operates on TCP port 22.
The RDP operates on TCP port 3389.
The Telnet service operates on TCP port 23.
HTTPS operates on TCP port 443.
Which tool is used for screen sharing?
A) RDP
B) MSRA
C) SSH
D) Telnet
MSRA
B. The built‐in Microsoft Remote Access (MSRA) tool is used for screen sharing between a trusted helper and a user. The Remote Desktop Protocol (RDP) is a protocol used to allow an administrator to connect remotely to a Windows server or workstation, but it does not support screen sharing. Both Secure Shell (SSH) and Telnet are protocols used for text‐based console access for administrating Linux/UNIX and network operating system environments.
what is extension type used with python scripts?
.py
what is an example of a low-level programming language?
machine or assembly language
what is the main difference between scripting languages and programming languages?
scripting languages are interpreted
what type of value contains a true or false value?
boolean
what is the extension used for a powershell script?
.ps1
what extension does a windows batch script use?
.bat or .cmd
what are the various commands in powershell called?
cmdlets
what is the extension for a bash script?
.sh
what is the directive that tells the operating system which interpreter to use?
the hashbang #!
where is javascript primarily used?
web browsers
what statement is used for looping in scripts that has a defined start, end and step?
for loop
which environment variable is inherited by each user who logs into the operating system?
system variable
which extension is used with javascript?
.js
what is an example of branch logic for a script?
if statement
what type of value can contain only positive and negative whole numbers?
integer
which command will allow you to access the windows command interpreter?
cmd.exe
which remote access technology provides a text console that is unencrypted?
telnet
which remote access technology operates on TCP port 3389?
RDP (remote desktop protocol)
which utility in windows 10 allows for remote assistance?
quick assist
which remote technology operates with TCP port 22?
ssh
what protocol does the remote desktop connection client use for making remote connections?
RDP TCP 3389
which remote access technology provides a text console that is encrypted and authenticated?
ssh
Which statement will load a PowerShell variable xvar with a value of 2?
$xvar = 2
xvar = 2
xvar = 2;
set /a xvar = 2
$xvar = 2
Which statement will load a Bash variable xvar with a value of 2?
$xvar = 2
xvar = 2
xvar = 2;
set /a xvar = 2
xvar = 2
Which statement will load a JavaScript variable xvar with a value of 2?
$xvar = 2
xvar = 2
xvar = 2;
set /a xvar = 2
xvar = 2;
Which statement will load a Windows batch script variable xvar with a value of 2?
$xvar = 2
xvar = 2
xvar = 2;
set /a xvar = 2
set /a xvar = 2
Which line would be used to comment on JavaScript code?
//comment
‘comment
REM comment
# comment
//comment
Which line would be used to comment on VBScript code?
//comment
‘comment
REM comment
# comment
‘comment
Which line would be used to comment on Windows batch script code?
//comment
‘comment
REM comment
# comment
REM comment
Which line would be used to comment on Bash script code?
//comment
‘comment
REM comment
# comment
’#’ comment
You need to create a script that will work the same on both Windows and Linux operating systems. Which scripting language will you choose?
A Bash script
B PowerShell
C Windows batch script
D Python
D Python
What is the difference between a while loop and a do while loop?
A In a while loop, the condition is specified at the end, whereas in a do while loop, the condition is specified at the beginning.
B In a while loop, the condition is specified at the beginning, whereas in a do while loop, the condition is specified at the end.
C In a while loop, the condition is specified in the middle, whereas in a do while loop, the condition is specified at the end.
D In a while loop, the condition is specified at the beginning, whereas in a do while loop, the condition is specified in the middle.
B In a while loop, the condition is specified at the beginning, whereas in a do while loop, the condition is specified at the end.
You work as an IT technician in an organization. A user filed a complaint about having some connectivity problems on his computer. You are asked to troubleshoot the problem immediately. Which of the following Windows utilities will you use to resolve the problem without visiting the user’s location?
A SERVICES.MSC
B MMC
C MSTSC
D REGEDIT
C MSTSC
Which remote technology can connect multiple sites over the Internet?
A Site-to-site VPN
B Host-to-site VPN
C SSH
D MSRA
D MSRA
What type of loop is a stepped loop with a defined beginning and a defined end, each step is defined as well?
For
What type of loop has no defined beginning, only a defined end, and it can be exited without consequence to the function?
While
What type of file extensions can be used to initiate a batch script?
.cmd and .bat
What command allows scripts to be run in windows?
set-executionpolicy unrestricted -y
What type of scripts only run on the Windows operating system?
VBScripts
Bash stands for?
Bourne Again shell
What command is used to map a network drive?
Net use m:\server\files
MECM
Microsoft endpoint configuration manager
What exe file will run the remote desktop protocol?
mstsc.exe
VNC normally operates on what port?
TCP 5900
The act of a threat agent guessing the meeting ID and joining an otherwise private conversation is?
Zoombombing
A computer component can be damaged with less than ? Volts
300
Under what circumstances should you not use an ESD strap?
When working inside a monitor or inside a power supply
What type of fire extinguisher should be used for wood and paper fires?
Type A
What type of fire extinguisher should be used for flammable liquids?
Type B
What type of fire extinguisher should be used for electrical fires?
Type c
What type of fire extinguisher should be used for flammable Metals such as phosphorus or sodium?
Type D
OSHA covers all ____ sector employees and ____ workers
Private and US postal service workers
What are the three overarching criteria to a safe work environment?
- the company and its employees have identified all significant hazards in the work setting
- Preventative measures have been taken to address each significant hazard
- The company and its employees understand how to respond to accidents or near Miss accidents if or when they occur
What types of batteries should be recycled?
Nickel cadmium are categorized by the EPA as hazardous waste
What type of detection is used when you are reviewing logs, content, or events and discover an incident?
Passive
What type of software provides a free trial, with the expectation you’ll pay for it if you like it and decide to keep it?
Shareware
What is a standard of processes and procedures used to handle data related to transactions using payment cards?
Payment card industry data security standard (PCI DSS)
What is a European Union law governing how consumer data can be used and protected?
GDPR General data protection regulation
PHI
Protected health information