I think it’s time to start moving into some relatively modern questions.

547. What is an associative array?

  • An unordered collection of data elements that are indexed by keys.

548. Each element of an associative array is a pair consisting of a _______ and a _______.

  • key and a value

549. True or False? Java supports associative arrays?

  • True. As a matter of fact, Perl, Python, Ruby, C++, C## and F## do too.

550. What are associative arrays called in Perl?

  • hashes

551. Why are associative arrays in Perl called hashes?

  • Because their elements are stored and retrieved with a hash function

552. What character does a hash in Perl begin with?

%

553. In Perl, each key is a _____ and each value is a _______.

  • string

  • scalar

554. In Perl, subscripting is done using _______ and _______.

  • braces and keys

555. In Perl, how are elements removed from hashes?

  • using delete

#computer-science-student #computer-science-theory #programming-languages #computer-science #programming

94 Programming Language Q&A
1.20 GEEK