0

programming languages Online Quiz - 14

Description: programming languages Online Quiz - 14
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

What is a loop ?

  1. A new type of Applet

  2. A segment of code to be run a specified amount of times

  3. A segment of code to be run infinite times

  4. A segment of code to be run once


Correct Option: B

BCPL stands for ?

  1. Basic Combined Programming Language

  2. Basic Computer Programming Language

  3. Basic Combination Programming Language

  4. None of the Above


Correct Option: A

Before Bob Muglia formally announced Windows PowerShell in April 2006, what was PowerShell's code name?

  1. Longhorn

  2. Monad

  3. Cairo

  4. Whistler


Correct Option: B
Explanation:

To answer this question, the user needs to have knowledge about the pre-release history of Windows PowerShell.

The correct answer is:

B. Monad

Explanation:

Before its formal announcement, Windows PowerShell was code-named "Monad." Monad was a project that Microsoft had been working on for several years. It was designed to be a task-based command-line shell and scripting language that would make it easier to automate system administration tasks. In 2006, Microsoft announced Monad as Windows PowerShell, which became its official name. Option B is the correct answer.

A. Longhorn: Longhorn was the code name for Windows Vista, which was released in 2006, the same year PowerShell was formally announced.

C. Cairo: Cairo was a code name for a project that Microsoft worked on in the early 1990s. It was intended to be a future version of Windows NT with an advanced object-oriented user interface and a new file system. However, the project was cancelled, and its technologies were incorporated into other Microsoft products.

D. Whistler: Whistler was the code name for Windows XP, which was released in 2001. It was the successor to Windows 2000 and was the first version of Windows to use the Windows NT kernel for both consumer and business versions of the operating system.

Which of the following Windows versions does NOT support Windows PowerShell?

  1. Windows 2000

  2. Windows XP SP2

  3. Windows Vista

  4. Windows Server 2003 SP1


Correct Option: A

You can launch Windows programs that have a GUI, such as Notepad and Calculator, within Windows PowerShell.

  1. True

  2. False


Correct Option: B

AI Explanation

To answer this question, you need to understand the capabilities and limitations of Windows PowerShell.

Option A) True - This option is incorrect. Windows PowerShell is primarily a command-line shell and scripting language, and it does not have built-in support for launching GUI programs like Notepad or Calculator. While it is possible to launch GUI programs from within PowerShell using specific commands or by invoking external processes, it is not a native or straightforward feature.

Option B) False - This option is correct. Windows PowerShell does not have native support for launching GUI programs. While it is possible to launch GUI programs from within PowerShell using specific commands or by invoking external processes, it is not a built-in capability.

The correct answer is B) False. This option is correct because Windows PowerShell does not natively support launching GUI programs like Notepad and Calculator.

If I sue Get-Process >>c\fso\process.txt and the c:\fso directory does not exist already.Windows powershell will automatically create the folder, and then create the file.

  1. True

  2. False


Correct Option: B

By default, you can run a Windows PowerShell script by double-clicking its icon.

  1. True

  2. False


Correct Option: B

AI Explanation

To answer this question, you need to understand how Windows PowerShell scripts are executed.

Option A) True - This option is incorrect. By default, you cannot run a Windows PowerShell script by double-clicking its icon. By default, double-clicking a PowerShell script's icon will open it in an editor, such as Notepad or PowerShell Integrated Scripting Environment (ISE), rather than executing the script.

Option B) False - This option is correct. By default, you cannot run a Windows PowerShell script by double-clicking its icon. You need to explicitly run the script using the PowerShell command line or by right-clicking the script and selecting "Run with PowerShell" from the context menu.

The correct answer is B) False.

To reduce typing, you can create an alternate name for a Windows PowerShell command called a/an ______________.

  1. Alias

  2. Cmdlet

  3. Object

  4. Pipe


Correct Option: A

AI Explanation

To answer this question, you need to understand the concept of aliases in Windows PowerShell.

Option A) Alias - This option is correct because an alias is an alternate name for a Windows PowerShell command. Aliases allow you to create shorter or more intuitive names for commands, reducing the need for typing longer command names.

Option B) Cmdlet - This option is incorrect because a cmdlet refers to a specific type of command in Windows PowerShell. Cmdlets are lightweight commands that perform specific actions and are used extensively in PowerShell scripting.

Option C) Object - This option is incorrect because an object refers to a data structure that contains properties and methods. In Windows PowerShell, cmdlets often output objects that can be manipulated and used in various ways.

Option D) Pipe - This option is incorrect because the pipe symbol (|) is used in Windows PowerShell to pass the output of one command as input to another command. It is not used to create an alternate name for a command.

The correct answer is A) Alias. This option is correct because an alias is used to create an alternate name for a Windows PowerShell command.

In addition to having the standard file system drives, like C: and D:, Windows PowerShell has drives that correspond to which of the following data stores?

  1. Local machine's digital signature certificate store

  2. HKEY_LOCAL_MACHINE registry hive

  3. HKEY_CURRENT_USER registry hive

  4. All of the above


Correct Option: D

AI Explanation

To answer this question, you need to understand the concept of Windows PowerShell drives.

Windows PowerShell drives are used to provide access to various data stores within the Windows operating system. In addition to the standard file system drives (like C: and D:), Windows PowerShell also has drives that correspond to other data stores.

Let's go through each option to understand why it is correct or incorrect:

Option A) Local machine's digital signature certificate store - This option is correct. Windows PowerShell has a drive called "Cert" that corresponds to the local machine's digital signature certificate store. This allows users to access and manage digital certificates using PowerShell commands.

Option B) HKEY_LOCAL_MACHINE registry hive - This option is correct. Windows PowerShell has a drive called "HKLM" that corresponds to the HKEY_LOCAL_MACHINE registry hive. This allows users to access and manipulate registry keys and values using PowerShell commands.

Option C) HKEY_CURRENT_USER registry hive - This option is correct. Windows PowerShell has a drive called "HKCU" that corresponds to the HKEY_CURRENT_USER registry hive. This allows users to access and modify registry keys and values specific to the current user using PowerShell commands.

Option D) All of the above - This option is correct. Windows PowerShell has drives that correspond to all of the mentioned data stores. In addition to the standard file system drives, PowerShell provides access to the local machine's digital signature certificate store (Cert drive), the HKEY_LOCAL_MACHINE registry hive (HKLM drive), and the HKEY_CURRENT_USER registry hive (HKCU drive).

Therefore, the correct answer is D) All of the above. This option is correct because Windows PowerShell has drives that correspond to all of the mentioned data stores, providing users with the ability to access and manage these data stores using PowerShell commands.

To Query from the Application logon your compute, you can use the Get-EventLog cmdlet in the Windows Powershell

  1. True

  2. False


Correct Option: B

AI Explanation

To answer this question, we need to understand how to query the Application log using the Get-EventLog cmdlet in Windows PowerShell.

Option A) True - This option is incorrect because the Get-EventLog cmdlet is used to query event logs, including the Application log. Therefore, it is true that you can use the Get-EventLog cmdlet to query the Application log.

Option B) False - This option is correct because it states that you cannot use the Get-EventLog cmdlet to query the Application log, which is incorrect. The Get-EventLog cmdlet is specifically designed to retrieve events from event logs, including the Application log.

The correct answer is B) False. This option is correct because you can use the Get-EventLog cmdlet in Windows PowerShell to query the Application log on your computer.

Windows PowerShell can execute commands in which of the following formats?

  1. Cmdlets

  2. PowerShell scripts

  3. Regular executables

  4. All of the above


Correct Option: D
Explanation:

To answer this question, the user needs to have basic knowledge of Windows PowerShell and its capabilities.

The correct answer is:

D. All of the above

Explanation:

PowerShell is a powerful command-line shell and scripting language that allows users to automate tasks and manage configurations. It can execute commands in the form of cmdlets, PowerShell scripts, and regular executables.

A. Cmdlets are PowerShell commands that are designed to perform a specific task. They are used to automate common system administration tasks and are built into Windows PowerShell.

B. PowerShell scripts are a series of commands that can be executed together to perform a more complex task. These scripts can be written using the PowerShell scripting language and can be run from within the PowerShell console.

C. Regular executables are standalone applications that can be executed from the PowerShell console or through a PowerShell script.

Therefore, the correct answer is D. All of the above, as Windows PowerShell can execute commands in all of these formats.

Windows PowerShell processes data as text, like Cmd.exe, BASH, and other UNIX shells.

  1. True

  2. False


Correct Option: B

AI Explanation

To answer this question, you need to understand the fundamental differences between Windows PowerShell and other shells like Cmd.exe, BASH, and other UNIX shells.

Option A) True - This option is incorrect. Windows PowerShell does not process data as text like Cmd.exe, BASH, and other UNIX shells. PowerShell processes data as objects, which allows for more advanced manipulation and automation.

Option B) False - This option is correct. Windows PowerShell processes data as objects, not as text. This means that PowerShell can work with structured data and perform operations on the properties and methods of the objects.

The correct answer is B) False. This option is correct because PowerShell processes data as objects, not as text like other shells.

PowerShell is often referred to as what?

  1. An object oriented shell built on the .NET Framework

  2. A clam shell

  3. A band shell

  4. All of the above


Correct Option: A
Explanation:

To answer this question, the user must be familiar with the basic features and functionalities of PowerShell.

The correct answer is:

A. An object-oriented shell built on the .NET Framework

Option A is correct because PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language. It is built on the .NET Framework and is object-oriented, allowing users to interact with various system objects through commands and scripts.

Option B is incorrect because "clam shell" is not a common term used to describe PowerShell. A "clam shell" typically refers to a type of laptop design where the screen and keyboard fold together to form a clam-like shape.

Option C is incorrect because a "band shell" is a type of outdoor performance venue and has nothing to do with PowerShell.

Option D is incorrect because only option A is correct. Options B and C are incorrect.

Therefore, the answer is:

The Answer is: A

What can you type in PowerShell to find out more information about a particular command?

  1. Oh magic genie

  2. Get-help

  3. Get-please

  4. All of the above


Correct Option: B

What must you set before you can run a PowerShell script?

  1. Your alarm clock

  2. Your budget

  3. Your execution policy

  4. All of the above


Correct Option: C

AI Explanation

To answer this question, you need to understand the concept of PowerShell execution policies.

Option A) Your alarm clock - This option is incorrect because setting an alarm clock is not necessary to run a PowerShell script. The execution of a script is not dependent on time management.

Option B) Your budget - This option is incorrect because setting a budget has no relevance to running a PowerShell script. The execution of a script is not related to financial planning.

Option C) Your execution policy - This option is correct because before running a PowerShell script, you need to set the execution policy. The execution policy determines the level of security for running scripts on your system. By default, the execution policy is set to "Restricted," which prevents the execution of any script. You need to change the execution policy to a more permissive value, such as "RemoteSigned" or "Unrestricted," to allow the execution of scripts.

Option D) All of the above - This option is incorrect because only option C, setting the execution policy, is relevant to running a PowerShell script. Options A and B (setting an alarm clock and a budget) have no connection to executing a script.

The correct answer is C) Your execution policy. This option is correct because before running a PowerShell script, you must set the execution policy to allow script execution on your system.

PowerShell is:

  1. An interactive management shell

  2. Something your job will eventually require

  3. All of the above

  4. shell


Correct Option: C
  1. A fabulous dessert topping

  2. A terrific floor wax

  3. The future of Windows automation and administration

  4. All of the above


Correct Option: C

PowerShell passes objects from one command to another via what?

  1. IRC

  2. E-mail

  3. The pipeline

  4. All of the above


Correct Option: C
- Hide questions