Static Type Binding

Get to know more about static type binding in programming languages

download Export
search_insights Statistics
stylus_note White Board
Quran
calculate Calculator
dictionary Dictionary
fullscreen Full Screen
QUESTION OF

volume_mute Read quiz aloud
Views #: 981
Questions #: 11
Time: 10 minutes
Pass Score: 80.0%
Style
Mode

Explicit vs Implicit declaration

1 pts
volume_mute
  • An (1) is a statement in a program that lists variable names and specifies that they are a particular type.
  • An (2) is a means of associating variables with types through default conventions, rather than declaration statements.
Please drag and drop the selected option in the right place or type it instead
explicit declaration
implicit declaration
note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Explicit declaration of variables

1 pts
volume_mute

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

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


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

1 pts
volume_mute
note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


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

1 pts
volume_mute
note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Fortran implicit declaration

1 pts
volume_mute

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.

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Fortran Implicit none

1 pts
volume_mute

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

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Starting names with special characters in Perl

1 pts
volume_mute

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), which can store either a string or a numeric value.
  2. If a name begins with @, it is an (2).
  3. If it begins with a %, it is a (3).
Please drag and drop the selected option in the right place or type it instead
hash structure
scalar
array
note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


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

1 pts
volume_mute
note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


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

1 pts
volume_mute
note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Assign the type that C# infers for the following declarations

1 pts
volume_mute
  • var sum = 0;(1)
  • var total = 0.0;(2)
  • var name = "Fred";(3)
Please drag and drop the selected option in the right place or type it instead
float
int
string
note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Choose the languages that use context to infer variable type

1 pts
volume_mute
note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation

Keywords
Year 11