System programming/SYSTEMS PROGRAMMING /PROGRAMMING LANGUAGES MCQ SET 1 Sample Test,Sample questions

Question:
	
An example of intermediate language is ?

1.SNOBOL

2.PASCAL

3.COBOL

4.UNCOL


Question:
	
Context free language can be recognized by

1.finite state automation

2. linear bounded automation

3.push down automata

4.both b and c


Question:
	
Context-free grammar (CFG) can be recognized by

1.finite state automata

2.2 way linear bounded automata

3.push down automata

4.both b and c


Question:
	
Data types are differed on basis of

1.way of storage

2. type of operations

3.both (a) and (b)

4. type of operators used


Question:
	
In COMAL language programs, parameters after name of procedure must be put in
	

1.brackets

2.back-slash

3.insecure data

4.punctuation marks


Question:
	
Items of data help making its structure is classified as

1.elements

2.data structure

3.string structure

4.variable structure


Question:
	
Language which have many types, but the type of every name and expression must be calculated at compile time are

1.weakly typed languages

2.loosely typed languages

3.strongly-type languages

4.none of these


Question:
	
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;
}

1.10

2.9

3.8

4.Error


Question:
24.	
In analyzing the compilation of PL/I program,the description creation of more optimal matrix is associated with

1.assembly and output

2.code generation

3.syntax analysis

4.machine independent optimization


Question:
A compiler can check

1.Logical Error

2.Syntax Error

3.Both Logical and Syntax Error

4.Not Logical and Syntax Error


Question:
A grammar for a programming language is a formal description of

1.Syntax

2.Semantics

3.Structure

4.Code


Question:
A grammar will be meaningless

1.if terminal set and non terminal set are not disjoint

2.if the left handside of a production has no non-terminal

3.if the left hand side of a production has non terminal

4.all of the above


Question:
A main procedural program contains modules. These modules are also called____________.

1.Packages

2.Units

3.Both (a) and (b)

4.None of the above


Question:
A special quantity named in a program and its value can be changed is called

1.variables

2.constant

3.mantissa

4.exponent


Question:
A special value placed at end of items data list is called

1.rogue value

2.vague values

3.decimal value

4.numerical value


Question:
An assembly language is a

1.low level programming language

2.Middle level programming language

3.High level programming language

4.Internet based programming language


Question:
Any syntactic construct that can be described by a regular expression can also be described by a

1.context sensitive grammar

2.non-context free grammar

3.context free grammar

4.none of these


Question:
Function which is used in stepwise refinement of program is classified

1.procedure

2.library format

3. routine format

4.subroutine format


Question:
In analyzing the compilation of PL/I program ,the term “lexical analysis” is associated with

1. recognition of basic syntactic constructs through reductions

2.recognition of basic elements and creation of uniform symbols

3.creation of more optional matrix

4. use of macro processor to produce more optimal assembly code


Question:
In high-level language COMAL, area is calculated as

1.Area: = Width*Length

2.100 Area = Width*Length

3.100 Area: = Width*Length

4.length 100: area*20width


Question:
In high-level language Pascal, area is calculated as

1.Area: = Width*Length;

2.length 100: area*20width

3.100 Area = Width*Length

4.100 Area = Width*Length


Question:
In line "100 INPUT NUM" of a BASIC program, NUM is if chosen by programmer is classified as

1. identifier

2.exponents

3.real constants

4.reserved variable


Question:
In line "110 DIM num(10)" in BASIC language, 'Line 110' declares

1.one-dimension array

2.two-dimension array

3.Three-dimension array

4.multi-dimension array


Question:
In line "550 INPUT NUM: PRINT 6.9*NUM*NUM+27" of a BASIC program, 'PRINT and INPUT' is

1.reserved words

2.reserved variable

3.reserved constant

4.reserved exponent


Question:
In repeat-until loop 'UNTIL Option>0 and Option<8 AND INT(Option) = Option' , INT function is classified as

1.option

2.function

3.format option

4.format function


Question:
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 ?

1.( L . D )*

2.( L∪ D ) *

3. L . ( L . D )*

4.L ( L ∪ D)*


Question:
Indicate which of the following is not true about 4GL?

1.4GL does not support a high-level of screen interaction

2.Many database management system packages support 4GLs

3.A 4GL is a software tool which is written, possibly, in some third generation language

4.All of the above


Question:
Programming language COBOL works best if used for

1.beginners

2.student applications

3.commercial applications

4.household user interface


Question:
Programming languages are the tools that allow communicating between__________.

1.Developer

2.Computer

3.Developer and data

4.Both (a) and (b)


Question:
Programming languages such as COMAL and Pascal allow subroutine which is classified as

1.procedure

2.library format

3.routine format

4.subroutine format


Question:
Sequence of instructions that are carried out for a particular task is classified as

1.routine

2.function

3.procedure

4.subroutine


Question:
Size of an array is declared by

1.software

2.programmer

3.program users

4.declared automatically


Question:
Statement "130 num(subs) = 2*subs-1" is an example of

1. array in BASIC

2.array in PASCAL

3.array in COMAL

4.array in COBOL


Question:
The actual text used to write the instructions for a computer program is called a_______________.

1.Source code

2.Compiler

3.Both (a) and (b)

4.Both (a) and (b)


Question:
The field that contains a segment index or an internal index is called

1.target datum

2.target offset

3.segment fiel

4.fix dat


Question:
The term environment in programming language semantics is said as

1.function that maps a name to value held there

2.function that maps a name to a storage location

3.the function that maps a storage location to the value held there

4.none of the above


Question:
Type of statement written in sequence and are repeated until conditions met is classified as

1.loop

2.case

3.format

4.condition


Question:
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;
}

1.-4

2.-5

3.10

4.11


Question:
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;
}

1.0

2.10

3.Garbage Value

4.Any Memory address


Question:
What will be output of the following c code?
#include
int main(){
volatile int a=11;
printf(“%d”,a);
return 0;
}

1.11

2.Garbage

3.-2

4. Cannot Predict


Question:
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;
}

1.00

2.65536 -10

3.0 65536

4.Compilation error


Question:
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;
}

1. 8 4 2

2.8 4 1

3.8 4 4

4.8 4 3


Question:
When divisions of decimals are involved in program, these numbers are stored in

1.real numbers

2.rational numbers

3.original numbers

4.irrational numbers


Question:
Which is not true about syntax and semantic parts of a computer language

1.syntax is generally checked by the programmer

2. semantics is the responsibility of the programmer

3. semantics is checeked mechanically by a computer

4. both b and c


Question:
Which of the following are language processors?

1.Assembler

2.Compiler

3.Interpreter

4.All of the above


Question:
Which of the following grammars are not phase structured

1.regular

2.context free grammar

3.context sensitive

4.none of these


Question:
Which of the following is integral data type?

1.void

2.char

3.float

4.double


Question:
Which of the following is most general phase structured grammar?

1.Context – Sensitive

2.Regular

3. Context – Free

4.None of the above


Question:
Which of the following is not a source error ?

1.faulty design specification

2.faulty algorithm

3.compilers themselves

4.none of these


Question:
Whole numbers from '0' and all negative numbers are classified as

1.integers

2.real numbers

3.prime numbers

4.composite numbers


More MCQS

  1. SYSTEMS PROGRAMMING MCQ SET 1
  2. SYSTEMS PROGRAMMING MCQ SET 2
  3. SYSTEMS PROGRAMMING /MACHINE STRUCTURE
  4. SYSTEMS PROGRAMMING /MACRO PROCESSOR
  5. SYSTEMS PROGRAMMING /LOADERS MCQ
  6. SYSTEMS PROGRAMMING /PROGRAMMING LANGUAGES MCQ SET 1
  7. SYSTEMS PROGRAMMING /PROGRAMMING LANGUAGES MCQ SET 2
  8. SYSTEMS PROGRAMMING /PROGRAMMING LANGUAGES MCQ SET 3
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!