Static Type Binding

Get to know more about static type binding in programming languages
👁 238
statistics
calculate
Questions #: 11
Time: 10 minutes
Pass Score: 80.0%
Style
Mode

Explicit vs Implicit declaration

  • An (1) transparent is a statement in a program that lists variable names and specifies that they are a particular type.
  • An (2) transparent is a means of associating variables with types through default conventions, rather than declaration statements.
drag and drop the selected option to the right place
explicit declaration
implicit declaration
POINTS (1)

Correct Answer

Explanation

Explicit declaration of variables

Most widely used programming languages that use static type binding exclusively and were designed since the mid-1960s require explicit declarations of all variables.

POINTS (1)

Correct Answer

Explanation

Perl, JavaScript, Ruby, and ML programming languages do not require explicit declaration of variables

POINTS (1)

Correct Answer

Explanation

Implicit variable type binding is done by the language processor, either a compiler or an interpreter

POINTS (1)

Correct Answer

Explanation

Fortran implicit declaration

An identifier that appears in a program that is not explicitly declared is implicitly declared according to the following convention: If the identifier begins with one of the letters I, J, K, L, M, or N, or their lowercase versions, it is implicitly declared to be Integer type; otherwise, it is implicitly declared to be Real type.

POINTS (1)

Correct Answer

Explanation

Fortran Implicit none

Many Fortran programmers now include the declaration Implicit none in their programs.  This declaration instructs the compiler to

POINTS (1)

Correct Answer

Explanation

Starting names with special characters in Perl

Some of the problems with implicit declarations can be avoided by requiring names for specific types to begin with particular special characters.  In Perl

  1. Any name that begins with $ is a (1) transparent , which can store either a string or a numeric value.
  2. If a name begins with @, it is an (2) transparent .
  3. If it begins with a %, it is a (3) transparent .
drag and drop the selected option to the right place
hash structure
scalar
array
POINTS (1)

Correct Answer

Explanation

In Perl, the names @apple and %apple are related

POINTS (1)

Correct Answer

Explanation

Programming languages that use context to implicitly determine the type of a variable is sometimes called type

POINTS (1)

Correct Answer

Explanation

Assign the type that C# infers for the following declarations

  • var sum = 0;(1) transparent
  • var total = 0.0;(2) transparent
  • var name = "Fred";(3) transparent
drag and drop the selected option to the right place
float
int
string
POINTS (1)

Correct Answer

Explanation

Choose the languages that use context to infer variable type

Visual BASIC 9.0+
Go
ML
Haskell
OCaml
F#
POINTS (1)

Correct Answer

Explanation

Views:
Trials:
Avg score:
0
sin cos tan
sin-1 cos-1 tan-1 π e
xy x3 x2 ex 10x
y√x 3√x √x ln log
( ) 1/x % n!
7 8 9 + MS
4 5 6 M+
1 2 3 × M-
0 . EXP ÷ MR
± RND C = MC

Document Actions