INTERACTIVE TEST 2: Variable Declarations | Notes | Tests | Home Page |
This browser does not support JavaScript. In order to use this test, please update your browser to a JavaScript compatible browser, or choose the CGI version of this test. Internet Explorer browsers are updated by http://www.microsoft.com/ie/, and Netscape browsers updated by accessing http://www.netscape.com/
1. The statement that correctly defines an integer called sum is
sum : integer; integer sum; integer : sum; sum integer;
2. The statement that declares a character called letter is
char := letter; type letter = char; letter = character; letter : char;
3. The statement that declares a variable called money which can be used to hold currency is
money : float; real = money; money : real; integer : money;
4. The statements that declares an integer variable called total and initialize it to zero, are
Statement 1
integer : total; total := 0;
Statement 2
total : integer = 0;
Statement 3
total : integer; total := 0;
5. The statement that declares a variable called loop, which can hold any integer value, is
loop : integer; integer = loop; declare loop as integer type; new integer loop;
Copyright B Brown/P Henry, 1988-1999. All rights reserved.