Principles of Programming Languages
1 of 2 sets
1. Which of the following is not the part of software development phases?
A. software designing
B. software validation
C. software dependent
D. software implementation
Answer:C
2. Which of the following is a functional programming language?
A. c
B. c++
o m
C. ml
. c
D. ada
te
Answer:C a
q M
c
3. Which of the following phase of software development is associated with creation
of test data ?
A. system analysis
M
B. design
C. coding
D. system acceptance
Answer:D
4. _________ is a module based programming language
A. c
B. c++
C. ml
D. ada
Answer:D
5. Which of the following is an object oriented programming language?
A. c
B. c++
C. ml
D. ada
Answer:B
6. Which of the following is secondary memory device?
A. keyboard
B. disk
C. alu
D. all of the above
Answer:B
7. Which of the following is a true statement regarding the SDLC phases.
A. the sdlc is not iterative.
B. the life cycle is always a sequentially ordered sets of phases.
C. it is not possible to completed some activities in one phase in parallel with those of another
phase.
D. the life cycle may be thought of as a circular process.
Answer:A
8. Which step of SDLC performs cost/benefit analysis?
A. feasibility study
B. analysis
C. design
D. none of these
Answer:B
9. The detailed study of existing system is referred to as
A. system planning
B. system analysis
C. feasibility study
D. design dfd
Answer:B
10. Prototyping aims at
View all MCQ's at McqMate.com
A. end user understanding and approval
B. program logic
C. planning of dataflow organization
D. none of these
Answer:A
11. What is a prototype
A. mini-model of existing system
B. mini-model of proposed system
C. working model of existing system
D. none of these
Answer:A
12. The Logic programming technique is implemented in :
A. declarative programming
B. object oriented programming
C. functional programming
D. generic programming
Answer:A
13. ALU stands for:
A. array logic unit
B. application logic unit
C. arithmetic logic unit
D. none of these
Answer:C
14. The difference between memory and storage is that memory is _________ and
storage is _________.
A. temporary,permanent
B. permanent,temporary
C. slow,fast
D. all of above
Answer:A
15. Which programming languages are classified as low level languages?
View all MCQ's at McqMate.com
A. cobol,fortran,pascal
B. prolog 2,expert systems
C. assembly languages
D. knowledge based systems
Answer:C
16. Which of the following is machine independence program?
A. high level language
B. low level language
C. assembly language
D. machine language
Answer:A
17. For specifying the syntax of a language _____________ is used.
A. context free language
B. regular expression
C. finite automata
D. none of these
Answer:A
18. Semantic of aprogram means
A. format of a program
B. meaning of a program
C. simply content of a program
D. none of these
Answer:A
19. The graphical representation of syntax is represented by ___________.
A. finite diagram
B. er diagram
C. syntax diagram
D. none of these
Answer:C
20. Which one of the following is not the stage of software development?
View all MCQ's at McqMate.com
A. requirement analysis and gathering
B. problem identification
C. software design
D. maintenance
Answer:B
21. The Linker __________________.
A. is similar to interpreter
B. uses source code as its input
C. it is required to create a load module
D. none of these
Answer:C
22. #include<stdio.h> #define count 10; void main() { printf("%d",count); }
A. 10
B. syntax error
C. 0
D. none of these
Answer:B
23. FORTRAN stands for:
A. free translator
B. formula translator
C. formula translation
D. free translation
Answer:B
24. Which is the longest scope in the following code?
#include <stdio.h>
int x;
int main()
{
int y;
fun();
return 0;
}
View all MCQ's at McqMate.com
void fun()
{
int z;
}
A. x
B. y
C. z
D. both a and b
Answer:A
25. The value of an automatic variable that is declared but not initialized will be
A. 0
B. -1
C. unpredictable
D. none of these
Answer:C
26. In C, reference is declared using the symbol
A. *
B. &
C. &&
D. !
Answer:B
27. The default parameter passing method used in C++ is ____________.
A. call by reference
B. call by value
C. call by name
D. none of these
Answer:B
28. The difference between memory and storage is that memory is
__________________ and storage is __________.
A. temporary, permanent
B. permanent,temporary
View all MCQ's at McqMate.com
C. slow,fast
D. all of above
Answer:A
29. What is relationship between reliability and failure?
A. direct relation
B. inverse relation
C. no relation
D. varying relationdepending upon the situation
Answer:B
30. Language efficiency can be achieved by ___________.
A. maximum speed
B. less memory consumption
C. reusability
D. all of these
Answer:D
31. Programming language FOTRAN stands for:
A. free translator
B. formula translator
C. formula translation
D. free translation
Answer:B
32. The full form of BNF is_____________.
A. beginning normal form
B. backus naur form
C. best normal form
D. none of these
Answer:B
33. Semantic of a program means-
A. format of a program
B. meaning of a program
View all MCQ's at McqMate.com
C. simply content of a program
D. none of these
Answer:B
34. What is the output of the following code?
Int main(void)
{
char name = 'P';
'P' = 10;
return 0;
}
A. name will contain value 10
B. p will contain 10
C. syntax error
D. none of these
Answer:C
35. Which of the following represents correct syntax for function declaration?
A. int sum(int,int);
B. int sum(int,int){}
C. int sum;
D. both a and c
Answer:A
36. During execution of a program the compiler demands for block of memory to
operating system.This block is called as _____________.
A. code memory
B. data memory
C. runtime storage
D. none of these
Answer:C
37. What is relationship between reliability and failure?
A. direct relationship
B. inverse relationship
C. no relation
D. varying relation depending upon the situation
View all MCQ's at McqMate.com
Answer:D
38. #include <stdio.h>
#define count 10;
void main()
{
printf("%d", count);
}
A. 10
B. syntax error
C. infinity
D. none of these
Answer:B
39. When variable used in the program is a whole number,then variable is stored
as ___________.
A. string data type
B. integer data type
C. negative whole number
D. positive whole number
Answer:B
40. Class is _______.
A. template which associates code and data
B. data abstraction
C. implementation of abstract data type
D. object oriented
Answer:D
41. What will be the output of following code? #include <iostream> using
namespace std;
int main()
{
enum color
{
blue, orange, green
};
View all MCQ's at McqMate.com
enum fruit
{
apple, guava, orange
};
int i = 0;
for (i = blue; i <= green; i++)
printf("%d", i);
return 0;
}
A. 0 1 2
B. 1 2 3
C. syntax error
D. none of these
Answer:C
42. What is the output of following code?
#include <iostream>
using namespace std;
int main()
{
int I;
enum test
{
a = 1, b, c, d, e, f, g, h
};
for (i = c; i <= g; i++) cout << " " << I;
return 0;
}
A. syntax error
B. 3 4 5 6 7
C. 1 2 3 4 5
D. none of these
Answer:B
43. Which size should be used when double precision is required?
A. float
B. double
View all MCQ's at McqMate.com
C. long double
D. none of these
Answer:B
44. #include <iostream>
using namespace std;
int main()
{
float a = 22.22;
double b = 22.22;
if (a == b) cout << "Matching";
else cout << "Not Matching";
return 0;
}
A. matching
B. non matching
C. syntax error
D. none of these
Answer:B
45. Explicit type conversion is known as_____.
A. conversion
B. casting
C. separation
D. none of these
Answer:B
46. What is the role of compiler by templates?
A. probability
B. type-safe
C. code elimination
D. allof these
Answer:B
47. A mathematical model with a collection of operations defined on that model is
called__________.
A. data structure
View all MCQ's at McqMate.com
B. abstract data type
C. built in data type
D. none of these
Answer:B
48. What is strong type system?
A. the type system in which only built-in data types are allowed.
B. the type system in which only user defined data types are allowed.
C. a type system that guarantees not to generate type errors.
D. none of these
Answer:C
49. Identify the built-in data type__________________.
A. struct
B. class
C. int
D. enum
Answer:C
50. What will happen if null pointer is converted to boolean___________.
A. the boolean value is evaluated to true
B. the boolean value is evaluated to false
C. errror is raised
D. none of these
Answer:B
51. What will be the output of the following code?
#include <iostream.h>
using namespace std;
int main()
{
float a = 'a';
cout << a;
return 0;
}
A. a
View all MCQ's at McqMate.com
B. 0.0
C. 97
D. syntax error
Answer:C
52. What will be the output of the following code?
int main()
{
char ch;
ch = 129;
printf("%d\n", ch);
return 0;
}
A. 129
B. -129
C. -127
D. syntax error
Answer:C
53. When the type conversion is required?
A. the value to be stored is in the form not supported by data type
B. the value supported is beyond the max limit
C. to reduce the memory in use associated with that value
D. all of these
Answer:D
54. What is the output of the following code?
int main()
{
double x = 1.2;
int sum = (int) x + 1;
printf("sum=%d", sum);
return 0;
}
A. 2.2
B. 2
C. 2
D. conversion from double to int is not possible
View all MCQ's at McqMate.com
Answer:B
55. #include <iostream>
using namespace std;
int main()
{
int a = 10, b = 20;
a = a++;
b = ++b;
cout << a << b;
return 0;
}
A. 10 20
B. 11 20
C. 10 21
D. 11 21
Answer:C
56. A strict type system in which one operand type A is allowed to perform
operation with another operand with type B.This feature of type system is called
_____________.
A. type compatibility
B. type equivalence
C. type conformance
D. all of these
Answer:D
57. What is strong type system?
A. the type system in which only built-in data types are allowed.
B. the type system in which only user defined data types are allowed.
C. the type system that guarantees not to generate type errors.
D. none of these
Answer:C
58. chosse the incorrect statement
A. int a[]=new int[10]
B. int[] a=new int[10]
C. int a[]=int[10] new
View all MCQ's at McqMate.com
D. all of these
Answer:C
59. which of the following is not data type in pascal?
A. real
B. float
C. double
D. struct
Answer:B
60. during implicit conversion is it possible to
A. loss of information
B. sign can be lost
C. occure overlow
D. all of these
Answer:C
61. For defining interface in java --------- keyword is used?
A. interface
B. interface
C. inter
D. class_interface
Answer:B
62. which of the not looping statement in c?
A. while
B. until
C. double
D. for
Answer:B
63. following is posted loop?
A. do while
B. for
C. if
View all MCQ's at McqMate.com
D. while
Answer:A
64. choose the correct?
I)procedure is a kind of routine that return a value?
II)functio is a kind of routine that dose no return any value?
A. only one
B. only two
C. both i&ii
D. none of these
Answer:D
65. exception is throw using the keyword ?
A. thrown
B. throw
C. throws
D. throwing
Answer:B
66. which keyword is use to check exception?
A. thrown
B. try
C. catch
D. exception
Answer:C
67. exception handling is for….
A. handling run time error
B. handling syntax error
C. handling logical error
D. all of these
Answer:A
68. FORTRAN uses______________.
A. static allocation strategy
B. stack allocation strategy
View all MCQ's at McqMate.com
C. heap allocation strategy
D. none of these
Answer:A
69. Execution time languages can be classified are__________.
A. static languages
B. stack-based languages
C. fully dynamic languages
D. all of these
Answer:D
70. call by name parameter passing method is used in___________.
A. c
B. pascal
C. algol
D. none of these
Answer:C
71. copy restore parameter passing method is used in___________.
A. c
B. pascal
C. ada
D. none of these
Answer:C
72. Grammars are capable to describe the structure of ........and independent
........models.
A. language and computational
B. language and lexical
C. language and syntactic
D. none of above.
Answer:A
73. The language syntax is characterized by two arrangements of rules: .......
and.........
A. logical and syantax
View all MCQ's at McqMate.com
B. lexical and syntactic
C. lexical and symmetric
D. none of these
Answer:B
74. The distinctin among ......and......standards is to same degree Subjective.
A. logical and syantax
B. lexical and symmetric
C. lexical and syntactic
D. none of these
Answer:C
75. ........give another method for characterizing structure of Programming
language.
A. syntax diagrams.
B. axiomatic and denotational approach.
C. context free grammar
D. all of these.
Answer:A
76. Representation of Non-terminals is done by.... and....by boxes.
A. circles and terminate
B. line and terminate
C. circle and terminal
D. line and terminal
Answer:C
77. The non-terminals symbol is defined with a transition diagram
having......................
A. one entry and two exit edge
B. two entry and one exit edge
C. one entry and one exit edge
D. one entry and no exit edge
Answer:C
View all MCQ's at McqMate.com
78. .........tell what is processed by giving a numerical question (function) which is
the significance of the program.
A. algebraic semantics.
B. denotational semantics.
C. operational semantics.
D. axiomatic semantics.
Answer:B
79. .....semantics are utilized when taking in a programming language and by
compiler journalists.
A. algebraic semantics.
B. denotational semantics.
C. operational semantics.
D. axiomatic semantics.
Answer:C
80. Translation semantics are used in.......
A. interpreters
B. compilers
C. errors.
D. both a and b
Answer:B
81. A program is viewed as a state machine by...........
A. algebraic semantics.
B. denotational semantics.
C. operational semantics.
D. axiomatic semantics.
Answer:D
82. In a compiler.....checks every character of the source text.
A. the lexical analyzer.
B. the syntax analyzer.
C. the code generator.
D. the code optimizer.
View all MCQ's at McqMate.com
Answer:A
83. ..... Syntax can only represent a rule in one line, whereas in.....a terminating
character, the semicolon, marks and end of a rule.
A. ebnf, bnf
B. bnf,ebnf
C. all of above
D. none of these
Answer:B
84. The full form of EBNF....
A. extended backus naur form
B. extended beginning normal form
C. extended best normal form
D. none of above
Answer:A
85. The syntax of language id define by two sets…
A. lexical rules
B. syntactic rules
C. both a & b
D. none of this
Answer:C
86. Syntax of ALGOL 60 was defined with
A. simply stating some rules in english
B. context-free grammar
C. simple language
D. no syntax
Answer:B
87. Meta-language is
A. used to described other language
B. simple language
C. instruction set
D. none of this
View all MCQ's at McqMate.com
Answer:A
88. EBNF is metalanguage
A. true
B. false
Answer:A
89. Postcondition is
A. predicate p required to hold after execution of statement s
B. predicate q such that execution of s terminates & p holds upon termination
C. either a or b
D. both true
Answer:A
90. Predicate Q can be return as
A. q=t and r;t=termination,r=truth of p
B. r=i
C. q=t
D. q=r
Answer:A
91. Predicate W is called as
A. weakest precondition
B. weakest postcondition
C. both a & b
D. none of this
Answer:A
92. Axiomatic semantics specifies each statement of a language in terms of asemis
A. predicate translation
B. predicate transformer
C. predicate q
D. none of this
Answer:B
View all MCQ's at McqMate.com
93. Function mem from the set of program identifiers ID to values
A. condition
B. predicate
C. function
D. state
Answer:D
94. I is invariant predicate that satisfies condtion
A. i and b subset of asem (l,i)
B. i and not b subset of p
C. both a and b
D. none of above
Answer:C
95. Which of the following is true about implicit cursor?
A. implicit cursor are used for sql that are not named
B. developers should use implicit cursors with great care
C. implicit cursors are no longer a feature in oracle
D. none of above
Answer:A
96. Which of the following is not a feature of a cursor FOR loop
A. record type declaration
B. opening and parsing of sql statement
C. fetches records from cursor
D. requires exit condition to be defined
Answer:B
97. Which of the following are implicit cursor attributes?
A. %found
B. %too_many_rows
C. %notfound
D. %rowtype
Answer:C
View all MCQ's at McqMate.com
98. In left out,which of the following would be cuase an infinite loop occure in a
simple loop?
A. loop
B. end loop
C. if_then
D. exit
Answer:B
99. Which of the following statement will produce an error?
A. cursor action_cursor is
B. select name,rate,action
C. into action_record
D. none of the above
Answer:C
100. The command used to open a CURSOR FOR loop is
A. open
B. fetch
C. parse
D. none of the above
Answer:D
View all MCQ's at McqMate.com