Programing Language Related Question

Programing Language Related Question In this article we are giving some programing related question ans answer.

Programing Language Related Question

Q. The vernacular language English can’t be used as a computer programming language because

A) It includes symbols that are not present in keyboard
B) it doesn’t have a well-defend syntax
C) it is ambiguous
D) computer do not understand English

Q. Consider the FORTRAN statement DO 51= 1, 10. To recognize DO 51 = 1; 10. To recognize DO as a keyword, the compiler has to scan

A) 5 characters beyond I/O
B) 3 characters beyond O
C) no characters beyond O
D) 8 characters beyond O

Q. Use of recursion is

A) Enhance logical clarity
B) makes debugging easier
C) reduces execution time
D) none of these

Q. A program has 100 instructions and another program has 200 instructions. Which of the following comment logically follows?

A) The execution time of the second program is more than that of the first
B) the execution time of the second program is same as that of the first
C) compilation time of second program is more than that of first
D) none of these

Q. The effect of using a command is to yield a new

A) Value
B) environment
C) store
D) none of these

Q. Which of the following languages different the case of alphabets?

C) C
D) none of these

Q. Val is well known

A) Real time language
B) object-oriented language
C) command language
D) data-flow language

Q. Consider the following Pascal function fib (n: integer): integer:
If(n = 0)then fibo : = 0
else if (n + 1) then fibo : = 1
else fibo : = fibo. (n – 1) + fibo (n – 2)
if fibo (5) is the function call; fibo (1) will be used

A) 3 times
B) 4 times
C) 5 times
D) 6 times

Q. An ordinary calculator treats

A) All operator to be equal precedence and associating to the right
B) All operator to be equal precedence and associating to the left
C) All operator to be unequal precedence and associating to the right
D) All operator in the usual mathematical sense

Q. In which of the following parameter passing mechanism the actual argument has to be a variable?

A) Pass by value
B) pass by result
C) pass by reference
D) both (a) and (b)

Q. Which of the following class of statements usually produce no object code when compiled?

A) Assignment
B) declaration
C) unreachable
D) control

Q. The principal that a function can always be replaced by value, without changing the meaning is called

A) Referential transparency
B) orthogonality
C) context free
D) unbinding

Q. Programming language offer features to write functions

A) To facilitate the implementation of top down logic
B) to enhance the implementation of bottom-up logic
C) to enhance logical clarity
D) both (a) and (c)

Q. The following Pascal1 procedure
procedure pal in ;
var C : char ;
read (c); if NOT eon then Palin ; write (c);
can be used to

A) check if a given string is palindrome or not
B) explain the concept of recursion
C) reverse a given string
D) both (b) and (c)

Q. The Out Put of the following Pascal program is
var a : integer ;
procedure p ;
a : 2; write (a)
a :1 ; p ; write (a)

A) 2, 1
B) 1, 2
C) 2, 2
D) 1, 1

Q. The period of time between an allocation and its subsequent disposal is called

A) scope
B) dynamic binding
C) life time
D) longevity

Q. Common feature in FORTRAN is not found in most of the languages that followed it, because

A) it is difficult to implement
B) memory is not of primary concern now-a-days
C) virtual memory concept obviates it
D) both (b) and (c)

Q. If instruction is executed in parallel, whenever the required operands are available, then the execution time of the previous problem is logically same as that of sequential algorithm consisting of

A) 3 statements
B) 2  statements
C) 4 statements
D) 5 statements

Q. Aliasing is a situation where

A) Two commands with different names share same code
B) a particular location is associated with more than one name
C) different function have the same name but require parameters of define types
D) both (a) and (b)

Q. Choose the correct remarks

A) In general, there is always an iterative equivalent of a recursive definition
B) recursion and iteration are equally powerful
C) recursion is powerful then iteration
D) both (a) and (b)

Q. English language uses full stop as a sentence

A) Separator
B) terminator
C) delimiter
D) both (a) and (b)

Q. In a hypothetical language, all operators have equal, precedence and associate to the left. In this language, the expression 5 * 3.2 – 1 + 2, evaluates to

A) 15
B) 11
C) 8
D) 20

Q. Overloading is

A) Function having the same name but with different types of parameters
B) a function used very frequently in a program
C) a operator, whose meaning is determined by the operand type
D) Both (a) and (b)

Q. You are asked to use computer to solve problem given to you. How fast the computer solve your problem depends on

A) Algorithms used
B) language used for implementation
C) programmer
D) all of these

Q. Which of the following is a dangling reference?

A) Accessing a storage that is aired disposed at the request of the user
B) accessing a storage that is already disposed at the request of the processor
C) accessing a variable, that is declared but not initiated
D) all of these

Q. Jessen’s device makes explicit use of the property of

A) Value parameters
B) reference parameter
C) name parameters
D) value result parameters

Q. Binding can occur while

A) Writing a program
B) compiling a program
C) invoking a subprogram
D) all of these

Q. Which of the following can be correctly identified to be Pascal tokens without look-ahead scanning?

A) :
B) :=
C) end
D) <

Q. Bending can’t be done

A) When separately compiled modules are being linked together
B) during loading
C) while writing a program
D) both (a) and (b)

Q. The target of an assignment statement should be

A) 1-value
B) either 1-value or R-value
C) R-value
D) none of these

Q. Which of the following problems are iterative, rather than recursive in nature?

A) Simplex method for solving a liner programming problem
B) newton-Raphson method for finding the roots of an equation
C) 8 queen’s problem
D) both(a) and (b)

Q. BNF is meta language for

A) Specifying the syntax of a language
B) specifying a context free grammar
C) decertifying how a program works
D) shell programming

Q. The language is as powerful as

C) C
D) all of these

Q. The following program
cpy A, x; clr C;
while (x not 0) do
incr  ; Dec x ;

A) assigns 0 to C
B) assigns 1 to C
C) assigns 0 to c, if a is even else assigns 1 to C
D) none of these

Q. In witch of following case, is it possible to obtain different results for call-by-reference and call-by-name parameter passing?

A) Passing an expression as a parameter
B) passing an array as a parameter
C) passing a pointer as a perimeter
D) passing an a array element as a parameter

Q. In the following segment, the value x, after the execution of the program is
x : = – 10, y : =  20 ; if x > y then if x < 0
then x : – abs (x) else x : = 2*x;

A) 20
B) 30
C) 10
D) -20

Q. Which of the following strings can be definitely said to be tokens without looking at the next input character while compiling  Pascal program.
I) begin
ii) program
iii) <>

A) I
B) ii
C) iii
D) none of these

Q. Assume X and Y are non-zero positive integers.
the following Pascal program
while x<> y do
if x > y then x : = x – y
else y : x – Y;
write (x);

A) Computer the LCM  number
B) divides the large number by the smaller number
C) computer the GCD of two number
D) finds the smaller of two numbers

Q. The value of x printed by the following Pascal program is
COMPUTE(input, output) ;
x ; integer
procedure FIND (X : real) ;
x : = sqrt (x) ;

A) 2
B) run time error
C) /2
D) none of these

Q. Consider the following macro definition
macro add x, y
load y
store y end macro x and y are

A) Variables
B) identifiers
C) actual parameters
D) formal parameters

Q. Output of the following Pascal program is
program x ;
var char, real : integer ;
false : Boolean ;
char : = 1 real : = char ; false : = (char = real) ;
if (false = true) then write in (‘don’t worry’)
else write in (‘be happy’)

A) Compilation error
B) don’t worry
C) a run time error message
D) be happy

Q. In Pascal
type abs = record
x ; integer
case y ; integer of
1 : cm : integer, n : real);
suppose a program uses an array of p such records. Integer needs 2 bytes of storage and real r bytes. If the array occupies 480 bytes, the value of p will be

A) 80
B) 50
C) 25
D) 60

Q. Which of the following parsing method handle left-recursive grammars?

A) Top-down parsing
B) Bottom-up parsing
C) both (a) and (b)
D) none of these

Q. Which of the following statements is incorrect?

A) Lr parsers can be constructed to recognize virtually all programming language constructs for which context-free grammar can be written.
B) the lr parsing method is the most general non-backtracking shift reduce parsing method known.
C) an lr parser can detect syntactic error as soon as it is possible to do so on a left to right scan of the input
D) the class of grammars that can be parsed using lr methods is a subset of the class of grammars that can be parsed with predictive parsers.

Q. Which of the following type expressions are equivalent?
i.e. : real > e
ii. F : real >(real f)
iii. F: real. (real e)

A) 1 and 2
B) 2 and 3
C) 1 and 3
D) 1, 2 and 3

Q. Search tables used by compilers for efficient searching generally use

A) Hash tables
B) liner lists of records
C) binary search tables
D) binary search trees

Q. FORTRAN implementation do not permit recursion because

A) They use static allocation for variables
B) they use dynamic allocation for variables
C) stacks are not available on all machines
D) it is not possible to implement recursion on all machines

Q. An unrestricted use of the “go to” statement is harmful because

A) It makes it more difficult to verify programs
B) it increases the running time of the program
C) it increases the memory required for the programs
D) it results in compiler generating longer machine code

Q. Which of the following features of Pascal cannot be captured by context-free grammars?

A) Syntax of if then else statements
B) syntax of recursive procedures
C) whether a variable has been declared before its use
D) variable names of arbitrary length

Q. Which of the following languages is not well suited for computation?

B) C

Q. Pascal is a

A) natural languages
B) assembly languages
C) machine languages
D) high level languages

Q. A languages developed to asset children in learning geometric shapes and computing aspects is


Q. The preliminary evaluation of a top down design before programs are written is referred to as a (an)

A) Informal design review
B) structured walk through
C) formal dessin review
D) scheduled review

Q. Which of the following is not an example of program documentation?

A) Source code
B) object code
C) specification
D) identifier names

Q. Which of the following is (are) among the levitate purposes of software?
I) to assist in maintaining and modification
II) to describe the capabilities of the program
III) to provide the user with instructions

A) 2 only
B) 3 only
C) 2 and 3 only
D) 1, 2 and 3 only

Q. Which of the following is on essential to stepwise refinement?
I) Refining the subprograms
II) decomposing the problem into sub problems
III) declaring all variables
IV) stating the problem simply
V) inputting the data

A) 2
B) 3 and 4
C) 4 and 5
D) 5

Q.  A top down approach to programming calls for
I) working from the general to the specific
II) postponing the minor decisions
III) a systematic approach
IV) immediate coding of the problem

A) 1
B) 1 and 2
C) 1, 2 and 3
D) 1, 2 and 4

Q.  Top down programming facilitates
I) implementing a complex problem in stage
II) readability
III) maintenance of the program
IV) testing of individual modules

A) 1 and 2
B) 1, 2 and 3
C) 2, 3 and 4
D) 1, 2, 3 and 4

Q.  Repeated execution of simple computation may cause compounding of

A) Round off errors
B) syntax errors
C) run time errors
D) logic errors

Q.  Through testing of a program ensures that it performs as expected a program should be tested
I) for each module in the program
II) with sample data
III) for every path through the program

A) 1 and 3
B) 1 and 2
C) 2 and 3
D) 1, 2 and 3

Q.  Modular programming involves
I) proceeding from particular to general
II) modules that solve individual tasks
III) problem decomposed into logical sub problems

A) 1 and 2
B) 1 and 3
C) 2 and 3
D) 1, 2 and 3

Q.  In PASCAL, which of the following is equivalent to trunc (-2.6)?

A) Trunc (-1.2)
B) trunc (-3.9)
C) round (-1.5)
D) round (-2.70)

Q.  Assuming that the alphabets are stored in ascending order with “a” as the 65th character, what is the correct evaluation of the following PASCAL expression?

A) ‘A’
B) ‘D’
C) ‘E’
D) ‘B’

Q.  A PASCAL procedure with the heading procedure find (var x: integer; y: integer) cannot be called by

A) Find (time, distance)
B) find (time + 5, distance + 10)
C) find (time, 100)
D) find(time, distance + 25)

Q.  Which of the following is true when a text file (in PASCAL) is opened for reading
I) eof is set to false
II) eoln is set to false
III) eof is undefined

A) 1
B) 2
C) 3
D) 1 and 2

Q.  Which of the following expressions (in PASEAL) evaluates to zero?

A) 4 mod 2-2
B) 1 – 5 mode 3
C) 5 mode 2 – 1
D) 6 div 2 – 2

Q.  In PASCAL, each of the elements bin the array var A: array (-6..6) of Boolean can have

A) One value
B) one of the two value
C) 12 value
D) 13 value

Q.  In C programming language, which of the following type of operators have the highest precedence?

A) Relational operators
B) equality operators
C) logical operators
D) arithmetic operators

Published by
Deep Khicher

Recent Posts

अपने डॉक्यूमेंट किससे Attest करवाए – List of Gazetted Officer

आज इस आर्टिकल में हम आपको बताएँगे की अपने डॉक्यूमेंट किससे Attest करवाए - List…

2 months ago

CGPSC SSE 09 Feb 2020 Paper – 2 Solved Question Paper

निर्देश : (प्र. 1-3) नीचे दिए गये प्रश्नों में, दो कथन S1 व S2 तथा…

8 months ago

CGPSC SSE 09 Feb 2020 Solved Question Paper

1. रतनपुर के कलचुरिशासक पृथ्वी देव प्रथम के सम्बन्ध में निम्नलिखित में से कौन सा…

9 months ago

Haryana Group D Important Question Hindi

आज इस आर्टिकल में हम आपको Haryana Group D Important Question Hindi के बारे में…

9 months ago

HSSC Group D Allocation List – HSSC Group D Result Posting List

अगर आपका selection HSSC group D में हुआ है और आपको कौन सा पद और…

9 months ago

HSSC Group D Syllabus & Exam Pattern – Haryana Group D

आज इस आर्टिकल में हम आपको HSSC Group D Syllabus & Exam Pattern - Haryana…

9 months ago