Câu hỏi luyện tập Perl
22/02/2012 - Xem: 1237
Một vài câu hỏi dùng trong quá trình dạy perl tại aiti-aptech
Perl Question
- What is the address of Perl’s home page?
- Who was the creator of Perl?
- How much does Perl cost?
- Why are comments important to programming?
- What are the four types of literals?
- What is a numeric literal?
- How many types of string literals are there?
- What is the major difference between single- and double-quoted strings?
- What are three escape sequences and what do they mean?
- What would the following one-line program display?
print `dir /*.log`;
- What is scientific notation?
- How can you represent the number 64 in hexadecimal inside a double-quoted string?
- What is the easiest way to represent an array that includes the numbers 56 to 87?
- What are the three basic data types that Perl uses?
- How can you determine the number of elements in an array?
- What is a namespace?
- What is the special variable $[ used for?
- What is the special variable $" used for?
- What is the value of a variable when it is first used?
- What is an associative array?
- How can you access associative array elements?
- What are three arithmetic operators?
- What does the x operator do?
- What does it mean to pre-decrement a variable?
- What is the value of 1 ^ 1?
- What is the value of 1 << 3?
- What is the ternary operator used for?
- Can the x operator be used with arrays?
- What is the precedence level of the range operator?
- What is the value of 2 * 5 + 10?
- What is the value of 65 >> 1?
- What is the spaceship operator used for?
- If an array were defined with ("fy".."gb"), what would its elements be?
- What is a parameter?
- What two functions are used to create variables with local scope?
- What does parameter passing by reference mean?
- What is the @_ array used for?
- Do Perl variables have global or local scope by default?
- Why is it hard to pass two arrays to a function?
- What is the difference between variables created with local() and variables created with my()?
- What does the map() function do?
- What is an expression?
- What is a statement?
- What are the four statement modifiers?
- What are two uses for statement blocks?
- What can non-action statements be used for?
- How is the if modifier different from the unless modifier?
- What will the following code display?
$firstVar = 10; $secondVar = 20; $firstVar += $secondVar++ if ($firstVar > 10); print("firstVar = $firstVar\n"); print("secondVar = $secondVar\n");
- What are the four loop keywords?
- What are the four jump keywords?
- Which form of the until statement is used when the statement block needs to be executed at least once?
- What will be displayed when this program executes?
$firstVar = 5; { if ($firstVar > 10) { last; } $firstVar++; redo; } print("$firstVar\n");
- What is the default name of the local variable in the foreach loop?
- How is the next keyword different from the redo keyword?
- Why is the comma operator useful in the initialization expression of a for loop?
- What is the shift() function used for?
- What is a reference?
- How many types of references are there?
- What does the ref() function return if passed a non-reference as a parameter?
- What notation is used to dereference a reference value?
- What is an anonymous array?
- What is a nested data structure?
- What will the following line of code display?
print("${\ref(\(1..5))}");
- Using the %database array in Listing 8.6, what will the following line of code display?
print(%{$database{"MRD-100"}}->{"Zip"} . "\n");
- What is a file handle?
- What is binary mode?
- What is a fully qualified file name?
- Are variables in the computer's memory considered persistent storage?
- What is the <> operator used for?
- What is the default file handle for the printf() function?
- What is the difference between the following two open statements?
open(FILE_ONE, ">FILE_ONE.DAT"); open(FILE_TWO, ">>FILE_TWO.DAT");
- What value will the following expression return?
(stat("09lst01.pl"))[7];
- What is globbing?
- Can you use variable interpolation with the translation operator?
- What happens if the pattern is empty?
- What variable does the substitution operator use as its default?
- Will the following line of code work?
m{.*];
- What is the /g option of the substitution operator used for?
- What does the \d meta-character sequence mean?
- What is the meaning of the dollar sign in the following pattern?
/AA[.<]$]ER/
- What is a word boundary?
- What is the syntax of the format statement?
- What is a footer?
- What function is used to invoke the format statement?
- How can you change a detail format line into a header format line?
- What is the > format character used for?
- What is the $^L variable used for?
- Can associative array variables be used in value lines?
- What is the $/ variable used for?
- What file handle is used to avoid a second system call when doing two or more file tests?
- What will the following program display?
$_ = "The big red shoe"; m/[rs].*\b/; print("$`\n");
- What variable holds the value of the last match string?
- Why is it important to check for errors?
- How is the die() function different from the warn() function?
- What is the meaning of the $! special variable?
- What does the eval() function do?
- What is a signal?
- What will the statement $SIG{'ABRT'} = 'IGNORE' do??
- Which signal is used to trap floating point exceptions?
- What will the following program display?
@array = (1..5); $" = "+"; print("@array\n");
- What does the following program display?
@array = ('A'..'E'); foreach (@array) { print(); } $\ = "\n"; foreach (@array) { print(); }
- What will the following line of code do?
select((select(ANNUAL_RPT), $^ = "REGIONAL_SALES")[0]);
- What will be displayed by the following program?
$_ = 'AB AB AC'; print m/c$/i;
- What will the following statement display?
printf("%x", 16);
(i-php.net)
Tin sưu tầm:
Các tin khác cùng chuyên mục
- Kỹ thuật lập trình HTML/CSS mới nhất 2020 - 04
- Funny web2.0
- Giải thử vài câu đề thi tốt nghiệp ptth môn toán
- MỘT NGÀY PHẢI KHÁC MỌI NGÀY
- Level 1 - Lập trình hướng đối tượng (P2)
- Level 1 - Lập trình hướng đối tượng (P1)
- PHP 5.3, Phần 3: Không gian tên
- PHP 5.3, Phần 2: Bao đóng và các hàm lambda
- PHP 5.3, Phần 1: Các thay đổi về giao diện đối tượng
- Tăng tốc độ xử lý CSDL MySQL
Liên kết
Tin được quan tâm nhất
- Ant Group của Jack Ma hé lộ bước đi đầu tiên...
- Ô tô giao hàng tự lái sẽ bắt đầu hoạt...
- Clip cô giáo phạt học sinh tự ném vỡ...
- Tiền điện tử lớn thứ ba thế giới Ripple...
- Joe Biden kêu gọi hiện đại hóa hệ thống...
- Viettel khai trương nền tảng Hồ sơ sức khỏe...
- Các hãng di động nên ngừng cãi nhau về việc...
- Công nghệ AI của Alibaba và Tân Hoa Xã: Đối...
- Một năm đáng thất vọng của YouTube trên toàn...
- EVN lần đầu diễn tập an toàn thông tin mạng...
- Đây là chiếc iPhone được mua nhiều nhất...
- Bộ Tài chính ra quy chế mới về quản lý, sử...
- Cập nhật nhãn mới giúp người tiêu dùng...
- Kiếm tiền từ 5G: Thách thức lớn nhất của...
- "Hô biến" iPhone thành cục đá: Có thể bị...
- Phí trước bạ ô tô không gia hạn giảm, sẽ...
- Tại sao Apple chế tạo ô tô?
- Viettel cung cấp dịch vụ 5G tại thành phố...
- Đội KingTigerPrawn của Hàn Quốc giành giải...
- Thứ trưởng Phan Tâm: “Triển khai hạ tầng 5G...
- Nhiều mẫu iPhone chính hãng đang khan hàng tại...
- Mỹ quy định drone cần có ID, trang bị đèn ban...
- Trung Quốc điều tra Alibaba: Bài học cho Jack Ma...
- Chuyên gia dự báo 5 xu hướng tấn công mạng...
- Apple MagSafe vẫn còn rất nửa vời
- Các tỉnh cuối cùng đã ngừng phát sóng...
- 55/63 tỉnh thành sử dụng Zalo trong cải cách...
- Headline: CR7: “Mong muốn của tôi là luôn...
- Samsung dự kiến xuất xưởng dưới 300 triệu...
- Vì sao Trung Quốc ‘sờ gáy’ Alibaba?
- Những smartphone được người Việt mua nhiều...
- Vì sao mua hàng ở sàn TMĐT Mỹ không cần...
- Đằng sau bức ảnh động viên Đà Nẵng chiến...
- VNPT cung cấp MyTV Box 2020 - Tính năng nâng cấp...
- Clip hành động ghê tởm của shipper trước khi...
- Các đội thi chung kết WhiteHat Grand Prix 6 phát...