Quiznetik

Principles of Programming Languages | Set 1

1. Which of the following is not the part of software development phases?

Correct : C. software dependent

2. Which of the following is a functional programming language?

Correct : C. ml

3. Which of the following phase of software development is associated with creation of test data ?

Correct : D. system acceptance

4. _________ is a module based programming language

Correct : D. ada

5. Which of the following is an object oriented programming language?

Correct : B. c++

6. Which of the following is secondary memory device?

Correct : B. disk

7. Which of the following is a true statement regarding the SDLC phases.

Correct : A. the sdlc is not iterative.

8. Which step of SDLC performs cost/benefit analysis?

Correct : B. analysis

9. The detailed study of existing system is referred to as

Correct : B. system analysis

10. Prototyping aims at

Correct : A. end user understanding and approval

11. What is a prototype

Correct : A. mini-model of existing system

12. The Logic programming technique is implemented in :

Correct : A. declarative programming

13. ALU stands for:

Correct : C. arithmetic logic unit

14. The difference between memory and storage is that memory is _________ and storage is _________.

Correct : A. temporary,permanent

15. Which programming languages are classified as low level languages?

Correct : C. assembly languages

16. Which of the following is machine independence program?

Correct : A. high level language

17. For specifying the syntax of a language _____________ is used.

Correct : A. context free language

18. Semantic of aprogram means

Correct : A. format of a program

19. The graphical representation of syntax is represented by ___________.

Correct : C. syntax diagram

20. Which one of the following is not the stage of software development?

Correct : B. problem identification

21. The Linker __________________.

Correct : C. it is required to create a load module

22. #include<stdio.h> #define count 10; void main() { printf("%d",count); }

Correct : B. syntax error

23. FORTRAN stands for:

Correct : B. formula translator

24. Which is the longest scope in the following code? #include <stdio.h> int x; int main() { int y; fun(); return 0; } void fun() { int z; }

Correct : A. x

25. The value of an automatic variable that is declared but not initialized will be

Correct : C. unpredictable

26. In C, reference is declared using the symbol

Correct : B. &

27. The default parameter passing method used in C++ is ____________.

Correct : B. call by value

28. The difference between memory and storage is that memory is __________________ and storage is __________.

Correct : A. temporary, permanent

29. What is relationship between reliability and failure?

Correct : B. inverse relation

30. Language efficiency can be achieved by ___________.

Correct : D. all of these

31. Programming language FOTRAN stands for:

Correct : B. formula translator

32. The full form of BNF is_____________.

Correct : B. backus naur form

33. Semantic of a program means-

Correct : B. meaning of a program

34. What is the output of the following code? Int main(void) { char name = 'P'; 'P' = 10; return 0; }

Correct : C. syntax error

35. Which of the following represents correct syntax for function declaration?

Correct : A. int sum(int,int);

36. During execution of a program the compiler demands for block of memory to operating system.This block is called as _____________.

Correct : C. runtime storage

37. What is relationship between reliability and failure?

Correct : D. varying relation depending upon the situation

38. #include <stdio.h> #define count 10; void main() { printf("%d", count); }

Correct : B. syntax error

39. When variable used in the program is a whole number,then variable is stored as ___________.

Correct : B. integer data type

40. Class is _______.

Correct : D. object oriented

41. What will be the output of following code? #include <iostream> using namespace std; int main() { enum color { blue, orange, green }; enum fruit { apple, guava, orange }; int i = 0; for (i = blue; i <= green; i++) printf("%d", i); return 0; }

Correct : C. syntax error

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

Correct : B. 3 4 5 6 7

43. Which size should be used when double precision is required?

Correct : B. double

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

Correct : B. non matching

45. Explicit type conversion is known as_____.

Correct : B. casting

46. What is the role of compiler by templates?

Correct : B. type-safe

47. A mathematical model with a collection of operations defined on that model is called__________.

Correct : B. abstract data type

48. What is strong type system?

Correct : C. a type system that guarantees not to generate type errors.

49. Identify the built-in data type__________________.

Correct : C. int

50. What will happen if null pointer is converted to boolean___________.

Correct : B. the boolean value is evaluated to false

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

Correct : C. 97

52. What will be the output of the following code? int main() { char ch; ch = 129; printf("%d\n", ch); return 0; }

Correct : C. -127

53. When the type conversion is required?

Correct : D. all of these

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

Correct : B. 2

55. #include <iostream> using namespace std; int main() { int a = 10, b = 20; a = a++; b = ++b; cout << a << b; return 0; }

Correct : C. 10 21

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 _____________.

Correct : D. all of these

57. What is strong type system?

Correct : C. the type system that guarantees not to generate type errors.

58. chosse the incorrect statement

Correct : C. int a[]=int[10] new

59. which of the following is not data type in pascal?

Correct : B. float

60. during implicit conversion is it possible to

Correct : C. occure overlow

61. For defining interface in java --------- keyword is used?

Correct : B. interface

62. which of the not looping statement in c?

Correct : B. until

63. following is posted loop?

Correct : A. do while

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?

Correct : D. none of these

65. exception is throw using the keyword ?

Correct : B. throw

66. which keyword is use to check exception?

Correct : C. catch

67. exception handling is for….

Correct : A. handling run time error

68. FORTRAN uses______________.

Correct : A. static allocation strategy

69. Execution time languages can be classified are__________.

Correct : D. all of these

70. call by name parameter passing method is used in___________.

Correct : C. algol

71. copy restore parameter passing method is used in___________.

Correct : C. ada

72. Grammars are capable to describe the structure of ........and independent ........models.

Correct : A. language and computational

73. The language syntax is characterized by two arrangements of rules: ....... and.........

Correct : B. lexical and syntactic

74. The distinctin among ......and......standards is to same degree Subjective.

Correct : C. lexical and syntactic

75. ........give another method for characterizing structure of Programming language.

Correct : A. syntax diagrams.

76. Representation of Non-terminals is done by.... and....by boxes.

Correct : C. circle and terminal

77. The non-terminals symbol is defined with a transition diagram having......................

Correct : C. one entry and one exit edge

78. .........tell what is processed by giving a numerical question (function) which is the significance of the program.

Correct : B. denotational semantics.

79. .....semantics are utilized when taking in a programming language and by compiler journalists.

Correct : C. operational semantics.

80. Translation semantics are used in.......

Correct : B. compilers

81. A program is viewed as a state machine by...........

Correct : D. axiomatic semantics.

82. In a compiler.....checks every character of the source text.

Correct : A. the lexical analyzer.

83. ..... Syntax can only represent a rule in one line, whereas in.....a terminating character, the semicolon, marks and end of a rule.

Correct : B. bnf,ebnf

84. The full form of EBNF....

Correct : A. extended backus naur form

85. The syntax of language id define by two sets…

Correct : C. both a & b

86. Syntax of ALGOL 60 was defined with

Correct : B. context-free grammar

87. Meta-language is

Correct : A. used to described other language

88. EBNF is metalanguage

Correct : A. true

89. Postcondition is

Correct : A. predicate p required to hold after execution of statement s

90. Predicate Q can be return as

Correct : A. q=t and r;t=termination,r=truth of p

91. Predicate W is called as

Correct : A. weakest precondition

92. Axiomatic semantics specifies each statement of a language in terms of asemis

Correct : B. predicate transformer

93. Function mem from the set of program identifiers ID to values

Correct : D. state

94. I is invariant predicate that satisfies condtion

Correct : C. both a and b

95. Which of the following is true about implicit cursor?

Correct : A. implicit cursor are used for sql that are not named

96. Which of the following is not a feature of a cursor FOR loop

Correct : B. opening and parsing of sql statement

97. Which of the following are implicit cursor attributes?

Correct : C. %notfound

98. In left out,which of the following would be cuase an infinite loop occure in a simple loop?

Correct : B. end loop

99. Which of the following statement will produce an error?

Correct : C. into action_record

100. The command used to open a CURSOR FOR loop is

Correct : D. none of the above