PERL Programming - 1
Description: PERL Programming | |
Number of Questions: 15 | |
Created by: Mohini Tyagi | |
Tags: Computer Programming |
Which of the following piece of code print the text covered by double quotes.
For Example: "Sun rises in the East"
Match the following:
A. Scalar | I. $ |
B. Array | II. % |
C. Associated Array | III. @ |
IV. * |
Choose the wrong one from the following SCALAR variable declarations
Find the correct syntax from the following
Which of the following syntax will return the size of the array @My_array @My_array = ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
Find the wrong array declaration from the following.
@alpha = (a..z); print "Before splicing - @alphan";
splice (@alpha, 5, 3, "af".."ah"); print "After splicing - @alphan";
This code produces the following result Before splicing - a b c d e f g h i j k l m n o p q r s t u v w x y z After splicing - a b c d e af ag ah i j k l m n o p q r s t u v w x y z
Which of the following statement is correct about the above piece of code. (Multiple answers mighe be correct)
Find the wrong Array declaration
Consider @Countries = ("India", "Denmark", "Russia", "Germany", "Japan", "Ireland")
Which of the following statement is correct about the Array operations? (Multiple answers might be correct)
$TCS_Office = "TATA CONSULTANCY SERVICES LIMITED, MADHAPUR".
Which of the following piece of code will convert the above string into array of elements and assign to @TCS_Off_Addr @TCS_Off_Addr = ("TATA", "CONSULTANCY", "SERVICES", "LIMITED,", "MADHAPUR");
Which of the following does not print the size of the array @My_array = (1..10);
Pick the wrong piece of code regarding the transformation of text into array.
Consider the Array @Countries = ("India", "Denmark", "Russia", "Germany", "Japan", "Ireland")
Which of the following statement is correct about the Array operations?
Which of the following is correct about Hashes in PERL ?
Pick wrong piece of code for printing the Hashes in PERL Consider the hash %My_Portfolio = ('DFHL', 100, 'ITC', 250, 'ASHOKLEY', 500, 'AXISBANK', 150);