A+ programming interview questions and answers

A+ is a powerful and efficient programming language. It is freely available under the GNU General Public License. It embodies a rich set of functions and operators, a modern graphical user interface with many widgets and automatic synchronization of widgets and variables, asynchronous execution of functions associated with variables and events, dynamic loading of user compiled subroutines, and many other features. Execution is by a rather efficient interpreter. A+ was created at Morgan Stanley. Primarily used in a computationally-intensive business environment, many critical applications written in A+ have withstood the demands of real world developers over many years. Written in an interpreted language, A+ applications tend to be portable.
source:http://www.aplusdev.org/index.html

2. Who Wrote A+ ?

A+ is written by Arthur Whitney at Morgan Stanley in 1988 .

3.What is APL programming language?

APL (named after the book A Programming Language) is a programming language developed in the 1960s by Kenneth E. Iverson. Its central datatype is the multidimensional array. It uses a large range of special graphic symbols to represent most functions and operators, leading to very concise code. It has been an important influence on the development of concept modeling, spreadsheets, functional programming, and computer math packages.It has also inspired several other programming languages.It is still used today for certain applications.
Source :Wikipedia.

4. What were the changes that the A+ language brought about in APL?

The A+ language implements the following changes to the APL language:

An A+ function may have up to nine formal parameters.

A+ code statements are separated by semicolons, so a single statement may be divided into two or more physical lines.

The explicit result of a function or operator is the result of the last statement executed.

A+ implements an object called a dependency, which is a global variable (the dependent variable) and an associated definition that is like a function with no arguments. Values can be explicitly set and referenced in exactly the same ways as for a global variable, but they can also be set through the associated definition.

5. List some features of A+ programming language

An A+ function may have up to nine formal parameters.

A+ code statements are separated by semicolons.

The explicit result of an operator or function is the result of the last statement executed.

A+ implements an object called a dependency.

6. Explain Nonscalar Primitive Functions

The A+ nonscalar primitive functions can be grouped, among many other ways, in these eight categories:

Unlike functions and operators, which take arguments and return results, control statements are primarily used for their side effects, although they always do have explicit results. Some control statements also have syntax that differs from that of functions taking arguments. The keywords are reserved: the words or names case, do, if, else, and while can appear only as parts of control statement

8. How numbers are represented in A+?

The machines on which A+ is run represent numbers in binary (base 2), for efficient storage and computation. A+ (via C) represents integers in 32 bits (binary digits) and floating-point numbers in 64. The largest integer representable in this way is (2*31)-1 and the smallest is ¢2*31 (-2147483648); the greatest magnitude representable as a floating-point number is approximately 1.7977e+308.

In display and print, of course, A+ represents numbers in decimal. People tend to think in decimal and their input is usually decimal. Numbers like .1 and .01 seem exactly representable intrinsically (as they are in decimal), but, in fact, these numbers cannot be exactly represented in binary, and decimal to binary and binary to decimal conversions are one source of imprecision. Read more from http://www.aplusdev.org/APlusRefV2_9.html

9. What is the rank operator?

The concepts of leading axis and item are generalized by treating an array as a frame defined by the array’s leading m axes holding cells of rank n defined by the array’s trailing n axes, where m+n is the rank of the array. A function f is applied to all cells of rank n with the expression f@n. The rank operator (@) applies uniformly to all functions of one or two arguments: primitive, derived, or defined, except Assignment and (because of its syntax) Bracket Indexing (@ does apply to Choose, which is semantically equivalent).