Programming Languages Fundamentals Quiz
Covers basic knowledge of multiple programming languages (BASIC, FORTRAN, COBOL, LISP, C++, Java) including language expansions, data types, operators, and syntax comparisons
Questions
Declarations must appear at the start of the body of a Java method.
- True
- False
All bitwise operations are carried out with the same level of precedence in Java.
- True
- False
The operations y >> 3 and y >>> 3 produce the same result when y > 0.
- True
- False
15 & 29 = ?
- 12
- 44
- 14
- 13
The type long in java can be used to store values in the following range:
- -231 to 231 - 1
- -232 to 232 - 1
- -264 to 264
- -263 to 263 - 1
What will be the result of the expression a % b when a and b are of type int and their values are a = 10 and b = 6?
- 1.66
- 4
- 1
- None of these
Identify the statements that are correct: (A) int a = 13, a>>2 = 3 (B) int b = -8, b>>1 = -4 (C) int a = 13, a>>>2 = 3 (D) int b = -8, b>>>1 = -4
- (A) & (B)
- (A), (B), (C) & (D)
- (A), (B) & (C)
- (C) & (D)
27 | 8 = ?
- 19
- 8
- 27
- 35
Consider the following code: int x, y, z; y = 1; z = 5; x = 0 - (++y) + z++; After execution of this, what will be the values of x, y and z?
- x = 4, y = 2, z = 6
- x = 3, y = 2, z = 6
- x = 4, y = 1, z = 5
- x = -7, y = 1, z = 5
What will be the result of the expression a % b when a and b are of type int and their values are a = -17 and b = -6?
- 5
- -5
- -23
- None of these
Which of the following is not a hexadecimal number? (A) 999 (B) (hex)23 (C) 0x556 (D) 0x1F2
- (A), (B) & (C)
- (A) & (B)
- (A)
- (C)
If not assigned a value, a variable of type char has the following default value:
- '\uffff'
- '\u0001'
- '\u0000'
- " " (space)
By which keyword Boolean data type is expressed in C++?
- boolean
- boo
- bolean
- bool
Java supports preprocessor.
- True
- False
C++ does not support string type.
- True
- False
C++ requires that you re-declare static data members outside the class. This is not required in Java.
- True
- False
Expanstion of LISP ....
- List Programming
- LISt Programming
- List Instruction Set Programming
- List Information Set Programming
Expansion of COBOL ....
- Common Object Business Oriented Language
- Complete Object Business Oriented Language
- Common Object BASIC Oriented Language
- Common Oriented Business Object Language
Expansion of FORTRAN ....
- FORmula TRANslation
- FORmula TRANslator
- FORmal TRANslation
- FORmal TRANslator
Expansion of BASIC ......
- Begin All Program Symbolic Instruction Code
- Beginners' All-purpose Symbolic Information Code
- Beginners' All-purpose System Instruction Code
- Beginners' All-purpose Symbolic Instruction Code