edited by
8,343 views
10 votes
10 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
edited by

4 Answers

8 votes
8 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.
1 votes
1 votes
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.
0 votes
0 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, ifforwhile 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 votes
–1 votes

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:

Related questions

6 votes
6 votes
4 answers
1
26 votes
26 votes
3 answers
2
Kathleen asked Sep 25, 2014
9,379 views
In a resident &ndash; OS computer, which of the following systems must reside in the main memory under all situations?AssemblerLinkerLoaderCompiler
2 votes
2 votes
2 answers
3
go_editor asked Jun 13, 2016
4,347 views
In C, what is the effect of a negative number in a field width specifier?the values are displayed right justifiedthe values are displayed centeredthe values are displayed...
7 votes
7 votes
4 answers
4
go_editor asked Jun 13, 2016
3,275 views
Repeated execution of simple computation may cause compounding ofround-off errorssyntax errorsrun-time errorslogic errors