Search Header Logo

Shell Programming Quiz ex.no 2

Authored by Denisha 2539

Computers

University

Used 2+ times

Shell Programming Quiz ex.no 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax to declare a variable in Shell?

variable_name = variable_value

var3 = 20

var1 : 10

var2 = Shell Programming

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to add values in Shell?

+

-

&

*

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to compare if two numbers are equal in Shell?

[ $a == $b ]

[ $a != $b ]

[ $a -eq $b ]

[ $a -ne $b ]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you concatenate two strings in Shell?

merge

append

concat

join

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to find the maximum of three numbers in Shell?

Using loops

Using comparison operators

Using if-else statements

Using arrays

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you perform arithmetic operations using switch case in Shell?

Using comparison operators

Using arrays

Using loops

Using if-else statements

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax to declare an array in Shell?

array(index) = value

array[index] : value

array{index} = value

array[index] = value

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers