• edited by
11,675 views
11 11 votes

Which of the following class of statement usually produces no executable code when compiled?

  1. declaration
  2. assignment statements
  3. input and output statements
  4. structural statements

5 Answers

9 9 votes
After compilation of the program, we could not identify the structure of the program. Since, after intermediate code generation we lost the structure of the program (you could not identify where the loop is? or other similar stuffs). So, correct option must be D.
2 2 votes
  • Declaration: This refers to the statement where a variable is declared but not necessarily assigned a value. For example, int a; in C++.
  • Assignment Statements: These are statements where a variable is assigned a value. For example, a = 5;.
  • Input and Output Statements: These are statements used for taking input from the user or displaying output. For example, cin >> a; or cout << a; in C++.
  • Structural Statements: These are statements that determine the structure or flow of control within a program. For example, if, for, while statements in C++.

Among these, declaration statements usually produce no executable code when compiled. They simply inform the compiler about the variables that will be used in the program, their type, and in some cases, initial values. The compiler uses this information for memory allocation and type checking during compile time, but no machine code is generated for execution during runtime. The other types of statements (assignment, input/output, and structural) typically result in executable code.

Answer) A

 

1 1 vote
I think ANS D) structural elements.

we use these for better readability purpose of programmar. tabs , new lines , spaces. these are not part of executable code.
1 1 vote

Structural elements, in the context of programming, refer to constructs that define the structure of a program but do not directly translate into executable code. These elements organize and control the flow of the program without performing actual operations that result in machine code execution.

Examples of structural elements include:

  • Control flow statements like if, for, while, which control the order of execution of statements but don't directly execute code themselves.
  • Block definitions like {} in C/C++, which group multiple statements together but do not produce code on their own.
  • Function or class definitions that define the structure of the code but do not result in execution until the function or class is instantiated or called.

In summary, structural elements are essential for organizing code and controlling how it operates, but they usually don't produce executable code on their own during compilation.

–1 –1 vote

c) Input and Output statements

Because Compiler has no idea what will be input and output at compile-time.

and ALL others statements are known to compiler at compile-time.

Answer:
Position:
Show:

Related questions

6 6 votes
4 answers 4 answers
5.0k
5.0k views
अनुराग पाण्डेय asked Oct 4, 2015
5,003 views
Relative to the program translated by a compiler, the same program when interpreted runsFasterSlowerAt the same speedMay be faster or slower
0 0 votes
0 0 answers
231
231 views
Shubham Sharma 2 asked Sep 10, 2025
231 views
Regarding the code optimization, choose the correct sequenceAlgebraic SimplificationUse of machine idiomsRedundant - instruction eliminationFlow of control optimizationIm...
0 0 votes
0 0 answers
533
533 views
admin asked Jan 6, 2024
533 views
Dead-code elimination in machine code optimization refers to :removal of all labels.removal of values that never get used.removal of function which are not involved.remov...
53 53 votes
7 answers 7 answers
25.5k
25.5k views
Kathleen asked Sep 11, 2014
25,494 views
Some code optimizations are carried out on the intermediate code becauseThey enhance the portability of the compiler to the target processorProgram analysis is more accur...