Theory of Computation and Compilers - Run Time Analysis

16. In some programming languages, an identifier is permitted to be a letter followed by any number of letters or digits. If L and D denotes the sets of letters and digits respectively, which of the following expressions define an identifier?

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


17. A language L allows declaration of arrays whose sizes are not known during compilation. It is required to make efficient use of memory. Which one of the following is true?

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


18. What are x and y in the following macro definition?
macro
  Add x, y
  Load y
  Mul x
  Store y
end macro

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


19. What is the value of X printed by the following program?
program COMPUTE ( input, output );
var X : integer ;
procedure FIND ( X: real );
   begin
    X : = sqrt (X);
   end;
begin
   X : = 2
   FIND (X)
   writeln (X)
end

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


20. Which of the following macros can put a macro assembler into an infinite loop?

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *