Perl and Java

Quiz
•
Computers
•
University
•
Hard
Annapoorani G
Used 4+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following data types are preceded by a dollar sign ($) in Perl?
Scalar
Array
Hashes
All of the above
Answer explanation
Scalars are preceded by a dollar sign ($).
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To verify if the variable $str contains the word “test” you would use
if ($str = ~/test/)
if ($str == “test”)
if ($str = “test”)
if ($str contains “test”)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To repeat a string, perl uses ___ operator.
/
.
x
\\
4.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
AVD stands for________
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output?
#!/usr/local/bin/perl
$a = 5;
until( $a > 10 ) {
printf "Value of a: $a\n";
$a = $a + 1;
}
Value of a: 5
Value of a: 6
Value of a: 7
Value of a: 8
Value of a: 9
Value of a: 10
5 6 7 8 9 10
Value of a: 5
6
7
8
9
10
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following commands is used to display the directory attributes
cat
ls
mkdir
cp
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Mystery animal game was based on
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#!/usr/bin/perl
%data = ('John Paul', 45, 'Lisa', 30, 'Kumar', 40);
print "\$data{'John Paul'} = $data{'John Paul'}\n";
print "\$data{'Lisa'} = $data{'Lisa'}\n";
print "\$data{'Kumar'} = $data{'Kumar'}\n";
What is the output of above code?
data{'John Paul'} = 45
data{'Lisa'} = 30
data{'Kumar'} = 40
$data{'John Paul'} = 45
$data{'Lisa'} = 30
$data{'Kumar'} = 40
\45=45
\30=30
\40=40
None of the above
Similar Resources on Wayground
10 questions
UAS Pemrograman Berorientasi Objek

Quiz
•
University
10 questions
Data Visualization Quiz

Quiz
•
University
10 questions
Unix & Shell Programming

Quiz
•
University
10 questions
Bahasa Pemrograman Python

Quiz
•
University
10 questions
2021_DASPRO_PERTEMUAN2

Quiz
•
University
10 questions
Python debugging

Quiz
•
University
10 questions
Python-Quiz-Basic-Datatypes

Quiz
•
12th Grade - Professi...
11 questions
Kuizi 1 - Python

Quiz
•
10th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University