And Answers | Latest Study Quiz
Interpretation of a program is the direct execution of one statement at a time sequentially.
True or False? ANS True
What kind of error is in the following line:-
int a = ((2*45)*(6/2) hello (4+90));
Lexical Error
Semantic Error
Correct! Syntactic Error
None of the above ANS What kind of error is in the following line:-
int a = ((2*45)*(6/2) hello (4+90));
Lexical Error
Semantic Error
Syntactic Error
None of the above
The syntactic structure of imperative programming languages normally include which of the following units:
operators
keywords
identifiers
conditional statements
,loop statements
variable declaration ANS conditional statements
loop statements
variable declaration
The compiler execute the program.
True or False ANS False
The semantic structure of imperative programming languages normally include which of the following
validations:
type matching
division by zero
a variable name should start with a letter, '$' or '_'
parameters type in a function declaration should match these in the function call.
statement should end with a ';'
unicity ANS type matching
parameters type in a function declaration should match these in the function call.
unicity
,Compilation of a program is to execute all the statements of the program completely.
True or False ANS True
During compilation, all the statements of a program in a high-level language are converted (translated) to a
low-level language (such as assembly language).
True or False ANS True
This programming language uses two-step translation with intermediate codes for execution.
C
C++
Java
C#
LISP ANS Java
The lexical structure of all programming languages are similar and normally include which of the following
units
identifiers
loop statements
keywords
operators
literals ANS identifiers
keywords
operators
literals
What is a data type?
, a specialized format for organizing and storing data
a storage location paired with an associated symbolic name
a piece of information
a set of primary values and the operations defined on these values ANS a set of primary values and the
operations defined on these values
Considering the following code
struct emp {
int id;
char *name;
};
struct emp john;
Which of the following lines are correct?
int a = 1;
char b[ ] = "John Doe";
emp.id = a;
emp.name = b;
printf ("%d, %s", emp.id, emp.name);
int a = 1;
char b[ ] = "John Doe";
john.id = b;
john.name = a;
printf ("%d, %s", john.id, john.name);