R4RIN
Articles
Java 8
MCQS
System programming MCQ Quiz Hub
SYSTEMS PROGRAMMING /PROGRAMMING LANGUAGES MCQ SET 1
Choose a topic to test your knowledge and improve your System programming skills
1. An example of intermediate language is ?
SNOBOL
PASCAL
COBOL
UNCOL
2. An assembly language is a
low level programming language
Middle level programming language
High level programming language
Internet based programming language
3. Which of the following are language processors?
Assembler
Compiler
Interpreter
All of the above
4. A grammar for a programming language is a formal description of
Syntax
Semantics
Structure
Code
5. Which of the following is most general phase structured grammar?
Context – Sensitive
Regular
Context – Free
None of the above
6. Context free language can be recognized by
finite state automation
linear bounded automation
push down automata
both b and c
7. Which is not true about syntax and semantic parts of a computer language
syntax is generally checked by the programmer
semantics is the responsibility of the programmer
semantics is checeked mechanically by a computer
both b and c
8. The term environment in programming language semantics is said as
function that maps a name to value held there
function that maps a name to a storage location
the function that maps a storage location to the value held there
none of the above
9. Which of the following grammars are not phase structured
regular
context free grammar
context sensitive
none of these
10. A grammar will be meaningless
if terminal set and non terminal set are not disjoint
if the left handside of a production has no non-terminal
if the left hand side of a production has non terminal
all of the above
11. Any syntactic construct that can be described by a regular expression can also be described by a
context sensitive grammar
non-context free grammar
context free grammar
none of these
12. Context-free grammar (CFG) can be recognized by
finite state automata
2 way linear bounded automata
push down automata
both b and c
13. Indicate which of the following is not true about 4GL?
4GL does not support a high-level of screen interaction
Many database management system packages support 4GLs
A 4GL is a software tool which is written, possibly, in some third generation language
All of the above
14. The field that contains a segment index or an internal index is called
target datum
target offset
segment fiel
fix dat
15. What will be output of the following code? #include int main(){ printf(“%d ”,sizeof(6.5)); printf(“%d ”,sizeof(90000)); printf(“%d”,sizeof(‘A’)); return 0; }
8 4 2
8 4 1
8 4 4
8 4 3
16. What will be output of the following c code? ( according to GCC compiler) #include int main(){ signed x; unsigned y; x = 10 +- 10u + 10u +- 10; y = x; if(x==y) printf(“%d %d”,x,y); else if(x!=y) printf(“%u %u”,x,y); return 0; }
00
65536 -10
0 65536
Compilation error
17. What will be output of the following c code? #include int main(){ const int *p; int a=10; p=&a; printf(“%d”,*p); return 0; }
0
10
Garbage Value
Any Memory address
18. What will be output of the following c code? #include int main(){ int a= sizeof(signed) +sizeof(unsigned); int b=sizeof(const)+sizeof(volatile); printf(“%d”,a+++b); return 0; }
10
9
8
Error
19. Which of the following is integral data type?
void
char
float
double
20. What will be output of the following c code? #include int main(){ volatile int a=11; printf(“%d”,a); return 0; }
11
Garbage
-2
Cannot Predict
21. What will be output of the following c code? #include const enum Alpha{ X, Y=5, Z }p=10; int main(){ enum Alpha a,b; a= X; b= Z; printf(“%d”,a+b-p); return 0; }
-4
-5
10
11
22. A compiler can check
Logical Error
Syntax Error
Both Logical and Syntax Error
Not Logical and Syntax Error
23. In analyzing the compilation of PL/I program ,the term “lexical analysis” is associated with
recognition of basic syntactic constructs through reductions
recognition of basic elements and creation of uniform symbols
creation of more optional matrix
use of macro processor to produce more optimal assembly code
24. 24. In analyzing the compilation of PL/I program,the description creation of more optimal matrix is associated with
assembly and output
code generation
syntax analysis
machine independent optimization
25. Which of the following is not a source error ?
faulty design specification
faulty algorithm
compilers themselves
none of these
26. A main procedural program contains modules. These modules are also called____________.
Packages
Units
Both (a) and (b)
None of the above
27. Programming languages are the tools that allow communicating between__________.
Developer
Computer
Developer and data
Both (a) and (b)
28. The actual text used to write the instructions for a computer program is called a_______________.
Source code
Compiler
Both (a) and (b)
Both (a) and (b)
29. Language which have many types, but the type of every name and expression must be calculated at compile time are
weakly typed languages
loosely typed languages
strongly-type languages
none of these
30. 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 ?
( L . D )*
( L∪ D ) *
L . ( L . D )*
L ( L ∪ D)*
31. In COMAL language programs, parameters after name of procedure must be put in
brackets
back-slash
insecure data
punctuation marks
32. Programming language COBOL works best if used for
beginners
student applications
commercial applications
household user interface
33. In line "110 DIM num(10)" in BASIC language, 'Line 110' declares
one-dimension array
two-dimension array
Three-dimension array
multi-dimension array
34. Statement "130 num(subs) = 2*subs-1" is an example of
array in BASIC
array in PASCAL
array in COMAL
array in COBOL
35. In high-level language COMAL, area is calculated as
Area: = Width*Length
100 Area = Width*Length
100 Area: = Width*Length
length 100: area*20width
36. Data types are differed on basis of
way of storage
type of operations
both (a) and (b)
type of operators used
37. Function which is used in stepwise refinement of program is classified
procedure
library format
routine format
subroutine format
38. When divisions of decimals are involved in program, these numbers are stored in
real numbers
rational numbers
original numbers
irrational numbers
39. Programming languages such as COMAL and Pascal allow subroutine which is classified as
procedure
library format
routine format
subroutine format
40. Items of data help making its structure is classified as
elements
data structure
string structure
variable structure
41. A special value placed at end of items data list is called
rogue value
vague values
decimal value
numerical value
42. A special quantity named in a program and its value can be changed is called
variables
constant
mantissa
exponent
43. In line "550 INPUT NUM: PRINT 6.9*NUM*NUM+27" of a BASIC program, 'PRINT and INPUT' is
reserved words
reserved variable
reserved constant
reserved exponent
44. Whole numbers from '0' and all negative numbers are classified as
integers
real numbers
prime numbers
composite numbers
45. In high-level language Pascal, area is calculated as
Area: = Width*Length;
length 100: area*20width
100 Area = Width*Length
100 Area = Width*Length
46. In line "100 INPUT NUM" of a BASIC program, NUM is if chosen by programmer is classified as
identifier
exponents
real constants
reserved variable
47. Type of statement written in sequence and are repeated until conditions met is classified as
loop
case
format
condition
48. Size of an array is declared by
software
programmer
program users
declared automatically
49. In repeat-until loop 'UNTIL Option>0 and Option<8 AND INT(Option) = Option' , INT function is classified as
option
function
format option
format function
50. Sequence of instructions that are carried out for a particular task is classified as
routine
function
procedure
subroutine
Submit