Answer:
c++ is my favorite programming language
TYPE BINDINGS
DYNAMIC TYPE BINDING
STORAGE BINDING
STATIC SCOPE
DYNAMIC SCOPE
What is your favorite programming language? List the choices (static vs. dynamic) of that language with...
Programming language
Q2. For each of the Storage Binding approaches below give a short description Storage Binding Static Stack-Dynamic Explicit Heap-Dynamic mic Implicit Heap Dyna
Dynamic vs Static Scoping: please explain answer
Consider the following program: Fill in the blanks with the resulting value you would expect from the following interpreters (enter only a single number in each blank): 1. An interpreter that implements dynamic scoping: 2. An interpreter that implements static, lexical scoping:
List 2 languages that use static type binding and 2 languages that use dynamic type binding?
List 2 languages that use static type binding and 2 languages that use dynamic type binding?
Programs written in a language that supports pointers and dynamic memory allocation can suffer from dangling pointers and lost heap-dynamic variables (or garbages). (a) A dangling pointer is a pointer that contains the address of a piece of memory that no longer belongs to the program. Give one scenario that can cause dangling pointers. Support your scenario with sample codes in your favorite language. Poorly implemented languages leave the detection of the dangling pointer problem to the operating system. Suggest...
Consider the following pseudocode which uses dynamic scoping. What does the program print if the language uses shallow binding? What does it print with deep binding? x: integer//global procedure print_x write_integer (x) procedure first x:= x * 3 procedure second (F: procedure) x: integer x: = 5 F () print_x () x: = 7 second (first) print_x ()
CONCEPTS OF PROGRAMMING LANGUAGE Consider the following skeleton program skeleton. List all the variables, along with the program units where they are declared, that are visible in the bodies of Sub1, Sub2, and Sub 3, assuming static scoping is used. Procedure Main is X, Y, Z: Integer; procedure Sub1 is A, Y, Z: Integer; begin -- of Sub1 ... end; -- of Sub1 procedure Sub2 is A, X, W: Integer; procedure Sub3 is A, B, Z: Integer; begin -- of...
Implement Huffman coding and Arithmetic coding algorithms using your favorite programming language. Note that you can't use existing libraries. Generate at least three types of statistically different artificial data sources to test your implementation of these algorithms (keep them short enough). Compare and comment on each algorithm’s performance in terms of the compression ratio for each type of data source. Please include: (i) the source code. (ii) your data sources. (iii) experiment results in your report. For the experiment results,...
1. What are the disadvantages and what are the advantages of dynamic type-binding? 2. What are the disadvantages and what are the advantages of static type-binding?
Programming Languages short answers a.) What is a static Variable? When is this variable bounded to a value? Describe a possible use of a static variable in a program b.) What is a DYNAMIC Variable? When is this variable bounded to a value? Describe a possible use of a Dynamic variable in a program