
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 205 Articles for Computer Programming

9K+ Views
A block is a statement containing its own local data declaration. The concept of a block is originated with ALGOL. The block-structured language permits an array with adjustable length. The main feature of blocks is their bracketing structure (begin and end used in ALGOL) in which they can define their data.Activation Record for Block Structured LanguagesBlock structured language like ALGOL, and PL/I permit adjustable arrays, i.e., of varying length. Therefore, we cannot store irregular size arrays in between activation records. It can allocate the flexible or variable arrays at one corner of the activation record or above the fixed-size data. ... Read More

8K+ Views
A block is a statement containing its own local data declaration. The concept of a block is originated with ALGOL. The block-structured language permits an array with adjustable length. The main feature of blocks is their bracketing structure (begin and end used in ALGOL) in which they can define their data. In 'C' language, the syntax of the block is −{ declaration statements; }where the braces limit the block. The characteristic of a block is its nesting structure. Delimiters mark the starting and end of the block. In 'C' language, the braces { } act as delimiters, while ALGOL ... Read More

2K+ Views
In stack allocation, it can analyze how the memory is allocated at runtime when a procedure is called & when the value from the procedure is returned.Passing Parameter to Procedure (param x)− When actual parameter x is passed to the procedure, it will be pushed into the stack, i.e., push (x).∴ param(x) refers to push (x) which refers to decrementing of the top pointer from N + 1 to N and x will be pushed onto the stack.∴ The following statements will be executed.top = top – 1*top = x or 0[top] = xHere 0[top] means 0 offsets from the ... Read More

5K+ Views
Stack Allocation scheme is the simplest Run-Time Storage Management Technique. The storage is allocated sequentially in the stack beginning at one end. Storage should be freed in the reverse order of allocation so that a block of storage being released is always at the top of the stack.A program consists of data and procedures. On execution of each procedure, some amount of memory is occupied, which has information regarding the procedure, i.e., its actual parameters, number of arguments, return address, return values & local data, etc. That part of memory is the Activation Record of that procedure.Activation RecordAn Activation Record ... Read More

15K+ Views
Heap allocation is the most flexible allocation scheme. Allocation and deallocation of memory can be done at any time and any place depending upon the user's requirement. Heap allocation is used to allocate memory to the variables dynamically and when the variables are no more used then claim it back.Heap management is specialized in data structure theory. There is generally some time and space overhead associated with heap manager. For efficiency reasons, it may be useful to handle small activation records of a particular size as a special case, as follows −For each size of interest, keep the linked list ... Read More

19K+ Views
The stack allocation is a runtime storage management technique. The activation records are pushed and popped as activations begin and end respectively.Storage for the locals in each call of the procedure is contained in the activation record for that call. Thus, locals are bound to fresh storage in each activation, because a new activation record is pushed onto the stack when the call is made.It can be determined the size of the variables at a run time & hence local variables can have different storage locations & different values during various activations. Suppose that the registered top marks the top ... Read More

7K+ Views
It is the simplest allocation scheme in which allocation of data objects is done at compile time because the size of every data item can be determined by the compiler. The main function of static allocation is to bind data items to a particular memory location. The static memory allocation procedure consists of determining the size of the instruction and data space.Recursive Subprogram and Arrays of adjustable length are not permitted in a language. In static allocation, the compiler can decide the amount of storage needed by each data object. Thus, it becomes easy for a compiler to find the ... Read More

680 Views
There are various issues in programming language design that affect the utilization of storage by a running program. There are several elements to which storage must be allocated to execute the object program. Storage space is majorly required for object programs and user-defined data structures, variables, and constants. There is also a need for storage space for procedure linkage information, temporaries required for expression evaluation, and parameter passing.There are the different ways in which various programming languages arrange space for object program are −Static storage allocation− It is the simplest allocation scheme in which allocation of data objects is done ... Read More

504 Views
Some factors affect the implementation of programming languages which are as follows −Scope − The scope of a declaration is that portion of a program where that declaration is applied. The implementation mechanism may be different for different languages. Scope rules for each language determine how to go from the declaration of the name. The usage of a name in a procedure is local if it is within the scope of a declaration within that procedure otherwise the usage is non-local. According to the scope of variables in a particular language, storage management is implemented.Lifetime of variable− The lifetime of ... Read More

3K+ Views
The compiler demands a block of memory for the operating system. The compiler utilizes this block of memory executing the compiled program. This block of memory is called storage management. One of the important tasks that a compiler must perform is to allocate the resources of the target machine to represent the data objects that are being manipulated by the source program.A compiler must decide the runtime representation of the data objects in the source program. In the source program, runtime representations of the data objects, such as integers and real variables, usually take the form of equivalent data objects ... Read More