Which one of the following is NOT performed during compilation?a)Dynam...
Dynamic means- at runtime. Dynamic memory allocation happens during the execution time and hence (A) is the answer.
View all questions of this test
Which one of the following is NOT performed during compilation?a)Dynam...
Explanation:
During the compilation process, the source code is converted into machine code that can be executed by the computer. Several tasks are performed during this process to ensure the correctness and efficiency of the resulting executable. Let's discuss each option and determine which one is not performed during compilation.
a) Dynamic memory allocation:
Dynamic memory allocation refers to the allocation and deallocation of memory at runtime. This is typically performed by the programming language's runtime system, not during compilation. The compiler does not handle dynamic memory allocation as it is a runtime feature.
b) Type checking:
Type checking is an important process performed during compilation. It involves verifying that the types of variables and expressions in the source code are consistent and compatible. The compiler checks for type errors and ensures that operations are performed on variables of appropriate types.
c) Symbol table management:
Symbol table management is a crucial task performed by the compiler. A symbol table is a data structure that keeps track of identifiers (variables, functions, etc.) in the source code and their associated information such as type, scope, and memory location. The compiler builds and maintains the symbol table to resolve references to identifiers and perform various optimizations.
d) Inline expansion:
Inline expansion, also known as inline substitution, is a compiler optimization technique that replaces a function call with the actual body of the function. This eliminates the overhead of function call and return, improving performance. Inline expansion is performed by the compiler during compilation to optimize code execution.
Conclusion:
Among the given options, dynamic memory allocation (option A) is not performed during compilation. It is a runtime feature handled by the programming language's runtime system. The other options (type checking, symbol table management, and inline expansion) are all important tasks performed during the compilation process.
Which one of the following is NOT performed during compilation?a)Dynam...
A dynamic memory allocation it only performs during runtime
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).