Skip to main content

Programming Language Concepts Test Questions/Answers

One of the easiest methods that I use to learn new topics is by creating notes on the subject and then by turning those notes into questions and answers. Remembering answers to questions just seems more natural. I was able to memorize 323 questions and answers in a matter of a couple of days. I wanted to start doing this for some topics that I find pretty interesting. To begin, here are some questions and answers to Programming Language Concepts (PLC). I'm reading your mind right now and the answer is yes, there will be more.

1. Name 3 reasons for studying PLC.
- Better understanding of current programming languages
- Advancement of computing
- Increased capability to express ideas
- Increased capability to learn new programming language.
- Better understanding of which programming language to choose. 

2. Name the 5 programming domains and languages best suited for each.
- Scientific (Fortran, ALGOL 60)
- Business (COBOL)
- AI (Lisp, Scheme, Prolog)
- Web (PHP, Java, JavaScript)
- Gaming (C, C++)

3. What are the 4 criteria for evaluating programming languages?
- Readability
- Writability
- Reliability
- Cost

4. In Reliability, what is meant by overall simplicity?
- A simple language has a relatively small number of basic constructs

5. What is feature multiplicity?
- Having more than one way to accomplish the same task. i.e. count++ or count = count + 1

6. Define orthogonality.
- Small set of primitive constructs can be combined to build the language’s data and control structures.

7. What’s orthogonality closely related to?
- Simplicity

8. True or False? Too much simplicity can be a problem.
- True

9. True or False? Too much orthogonality can cause problems?
- True

10. Give an example of data type problem.
- C89 didn’t have boolean type so x = 1 is ambiguous and can mean either x = integer 1 or x = true

11. Fill in the word Semantics (________) should follow directly from __________ (form)
- meaning
- Syntax

12. Why is simplicity and orthogonality a problem in writability?
- A large number of features can lead to misuse of some features and disuse of superior features

13. When does orthogonality help writability?
- When the features are not overly orthogonal

14. When is a language expressive?
- A language is expressive if it has features that make it easier to perform common tasks.

15. Reliability…what is type checking?
- Checks type errors either during compilation or run-time

16. When is type checking preferred?
- During compilation since run-time checking is expensive

17. What is exception handling?
- Interception of errors during run-time and taking care of those errors.

18. What is aliasing?
- Having two or more names assigned to same memory location.

19. How does readability and writability influence reliability?
- If a language is hard to read, it’s hard to debug. If it’s written unnaturally, it’s more likely to contain bugs.

20. Name a few costs to consider when evaluating a programming language.
- Cost of training programmers
- Cost of compilation
- Cost of execution
- Cost of implementation

21. What is optimization and why is considered a factor in cost?
- Optimization is an attempt to save time or space. Optimization increases compilation time.

22. What are the most important contributors to language cost?
- Reliability, Maintenance and Program Development

23. Name some other criteria for evaluating programming languages.
- Generality
- Portability
- Well-Definedness.

24. Most popular languages have been designed around what architecture?
- Von Neumann architecture

25. What is the name of languages that are based on the von Neumann architecture?
- Imperative languages

26. What are imperative languages based on?
- Von Neumann architecture.

27. What do the variable names represent in an imperative language?
- Memory cells

28. What do assignment statements represent in an imperative language?
- The movement of data from memory to CPU and back again.

29. Name the programming design methodologies.
- Top-down design or Stepwise refinement
- Data abstraction
- Object-oriented design

30. Which language helped popularize object-oriented programming?
- Smalltalk

31. Name the four categories that programming languages are put into.
- Imperative, Functional, Logic and Object-Oriented

32. Describe a functional programming language.
- Ability to define and call functions.

33. Describe a logic language.
- Contains a set of facts and rules.

34. Object-oriented languages are often extensions of _______ _______.
- Imperative languages

35. True or False? Markup languages are programming languages?
- False

36. Name some language trade offs
- Reliability vs. Cost of execution
- Writability vs. Readability
- Writability vs. Reliability

37. Name one implementation method for a programming language.
- Compilation

38. What is compilation?
- Process where source code is translated to machine language by compiler

39. What is an advantage of compilation?
- Fast program execution

40. What are the phases of a compiler?
- Lexical analyzer, Syntax Analyzer, Intermediate Code Generator, Optimizer, Code generator

41. What does the lexical analyzer do?
- Discards comments and gathers characters into lexemes.

42. What does the syntax analyzer do?
- Checks for syntax errors and creates parse trees from lexemes.

43. What does the intermediate code generator do?
- Checks for semantic errors and translates the program into an intermediate language similar to assembly.

44. What does an optimizer do?
- Attempts to make program smaller and faster.

45. What does the code generator do?
- Translates intermediate code into machine language.

46. True or false? All phases of a compiler use a symbol table.
- True

47. What is a purpose of a linker?
- To combine code from different modules into a single program
- To include code for calls of library routines
- Include code for communication with OS

48. What is the output of a linker?
- An executable image

49. What is pure interpretation?
- Execution of a program by an interpreter without having source code being translated to lower form.

50. What is an advantage for interpretation?
- Good for debugging

51. What are some disadvantages of interpretation?
- Slow execution
- Requires more space during execution

52. Describe the hybrid implementation system.
- Source code is generated into intermediate code and is sent to an interpreter.

53. What type of intermediate code is produced by the Java Compiler?
- Byte code

54. What is Java’s interpreter called?
- Java Virtual Machine (JVM)

55. What type of compilation do Java interpreters perform?
- Just-In-Time compilation

56. What is Just-In-Time compilation?
- The translation of byte code into machine code at execution

57. Which programming languages rely on a preprocessor?
- C and C++

58. What does a preprocessor do?
- Takes embedded commands from the source code and removes them prior to compilation.
- For example, #include “myLib.h” is copied to source code

59. What is a programming environment?
- A collection of tools to develop software.

60. What is an IDE?
- Environment that provides a set of integrated tools to access through a UI.

61. Who developed Plankalkul?
- Konrad Zuse

62. What was Plankalkul good for?
- Good for expressing computations.

63. What does Plankalkul mean?
- Program Calculus

64. True or False? Plankalkul was never implemented.
- True

65. What is the simplest data structure in Plankalkul?
- Single bit

66. What types can be derived from the single bit in Plankalkul?
- Floating point and Integer

67. Fill in the blank. In Plankalkul, floating-point used ______ ___________ notation and hidden bit
- Twos-complement

68. True or False? In Plankalkul, the if statement has an optional else statement.
- False

69. Does Plankalkul have a goto statement?
- No

70. Fill in the blank. Plankalkul has a for statement similar to the one in ________.
- Pascal

71. Did Plankalkul include assertions?
- Yes

72. What are assertions?
- Mathematical expressions showing the current relationships between program variables.

73. What are some problems of machine code?
- Hard to read
- Absolute addressing makes modification tedious.

74. Name two Pseudocode languages.
- Short Code and Speedcode

75. Who developed Short Code?
- John Mauchly

76. True or False? Short code consisted of coded versions of mathematical expressions.
- True

77. How were variable’s named in Short Code?
- With byte-pair codes.

78. Was Short Code compiled or interpreted?
- Interpreted

79. What was another name for interpretation during the time of Short Code?
- Automatic Programming

80. Who developed Speedcode?
- John Backus for IBM 701

81. The 701 was extended into a virtual _____ _____ ________.
- Three point calculator

82. True or false? Speedcode was much more efficient than Machine Code?
- True

83. Who developed the UNIVAC compiling system?
- Grace Hopper

84. What were the names of the compiling systems that Grace Hopper developed?
- A-0, A-1 and A-2

85. What did the compiling systems do that Grace Hopper developed?
- Expanded pseudocodes into machine code.

86. Who developed Fortran?
- John Backus for the IBM 704

87. What was the primary goal of the Fortran compiler?
- Speed of generated code

88. True or false? The Fortran compiler was almost half as efficient as the what could be done by hand.
- True

89. Fill in the blank. ________ was the first widely accepted compiled high-level language
- Fortran

90. True or False. Fortran I had I/O formatting.
- True

91. How many characters could be in a variable name in Fortran I?
- Up to 6

92. True or False? Fortran I had user-defined subroutines.
- True

93. True or False? Fortran I had an if/else statement.
- False, only an if statement

94. How did programmers declare a variable as an integer in Fortrain I? How about Floating Point?
- By having the name start with I, J, K, L, M or N, variables were implicitly integer. All others were floating point

95. What feature was added in Fortran II?
- Independent compilation of subroutines

96. True or False? Fortran III was the most successful Fortran version.
- False. Fortran was never widely distributed.

97. What was the first standardized Fortran version? Which year?
- Fortran IV in 1966.

98. Which features did Fortran IV add?
- Explicit type declaration of variables
- Ability to pass subprograms as parameters to other subprograms
- A logical IF construct

99. When did Fortran receive an ELSE to its IF statement?
- Fortran 77

100. When did Fortran start supporting lower case letters?
- Fortran 90

101. Name other features implemented in Fortran 90.
- Recursion
- Dynamic arrays, pointers and multiple selection statement

102. What did the Fortran 90 standardization include?
- A list of features to be removed

103. When did Fortran receive Object-Oriented capabilities?
- Fortran 2003

104. Name a feature added in Fortran 2008
- Better support for concurrent programming

105. Who developed Lisp?
- John McCarthy

106. What type of language is Lisp?
- Functional programming language

107. True or False? Lisp is purely functional.
- True

108. What are the two data structures in Lisp?
- Atom and List

109. What is a List?
- A series of elements enclosed in parentheses (A B C D)

110. Elements in a List can be ________ or ________ _________.
- Atoms or other lists 

111. How is computation done in Lisp?
- By applying functions to arguments

112. True or False? Both assignment statements and variables are necessary in Lisp.
- False. Neither

113. What does Lisp use for Iteration?
- Recursion

114. True or False? Both program code and data are written in list form in Lisp.
- True

115. Describe the program code in List (A B C D) in Lisp.
- Function A followed by three parameters B, C, D

116. Name a couple of descendants of Lisp.
- Scheme, Common Lisp, MetaLanguage, Miranda, Haskell, F#

117. Name a functional language developed by Microsoft.
- F#

118. Who developed ALGOL 58?
- Fritz Bauer

119. What did the assignment statement look like in ALGOL 58?
- variable := expression

120. True or False? ALGOL 58 was close to mathematical notation?
- True

121. True or False? ALGOL 58 formalized the concept of data-types?
- True

122. True or False? ALGOL 58 contained compound statements?
- True

123. How many array dimensions were allowed in ALGOL 58?
- Any number

124. What was the lower bound of arrays in ALGOL 58?
- It was anything the programmer specified

125. True or False? Selection statements could be nested.
- True

126. What does BNF stand for?
- Backus-Naur Form

127. What is BNF is for?
- Describing programming language syntax.

128. Name a few features introduced in ALGOL 60.
- Recursive procedures
- Stack-dynamic arrays
- Block structure
- Parameters passed to subprograms as value or name

129. Who wrote the description for ALGOL 60 and which form did he use?
- Peter Naur. He used BNF.

130. Name 3 firsts for ALGOL 60
- It was the first language designed by an international group
- It was the first language designed to be machine independent
- It was the first language whose syntax was formally described

131. Which language was used as the only acceptable means of communicating algorithms?
- ALGOL 60

132. List a few reasons why ALGOL 60 was never widely accepted.
- Too flexible
- Lack of I/O statements
- BNF seemed strange and complex
- Lack of support from IBM

133. Who made FLOW-MATIC and for which programming domain?
- Grace Hopper for Business application

134. Who developed COBOL?
- Developed by Tierney and friends <- too many names lol

135. Where was the idea of COBOL developed?
- The Pentagon

136. Name a few things COBOL was trying to achieve.
- Use English as much as possible
- Should not be restricted by implementation
- Easy to use

137. What are the two sections that COBOL code is separated into?
- Data Description and Executable operations

138. Which language has been used more than any other programming language?
- COBOL

139. What was the first programming language mandated by DoD?
- COBOL

140. Fill in the blank. _____ was the first high-level language with construct for macros
- COBOL

141. How many characters could COBOL have in its variable names?
- Up to 30

142. What other character was allowed in COBOL variable names?
- Dashes

143. Who developed BASIC?
- John Kemeny and Thomas Kurtz

144. Why was BASIC popular?
- It was used in weaker Microcomputers.

145. Why did BASIC start to lose its popularity?
- Because Microcomputers became more powerful

146. Who was the primary target audience of BASIC?
- Beginners; non-science students

147. What was the first widely used language to allow program development via terminals connected to computers?
- BASIC

148. True or False? BASIC valued computer time more than user time.
- False

149. What was the first large-scale attempt to design a language that could be used for a broad spectrum of application areas?
- PL/I

150. What was PL/I attempting to achieve?
- Combine Business and Scientific domains into one. 

151. What was a disadvantage of PL/I?
- Had too many features and some features were not well designed.

152. What did both APL and SNOBOL have?
- Dynamic typing and Dynamic Storage Allocation

153. What is dynamic typing?
- Variable acquires a type when value is assigned

154. What is dynamic storage allocation?
- Storage allocated to variable when value is assigned

155. Who developed APL?
- Kenneth Iverson

156. Why was APL developed?
- To describe computer architecture

157. What is APL famous for?
- Large collection of operators such as unit operations on arrays.

158. True or False? APL is easy to read.
- False

159. Who designed SNOBOL?
- Farber, Griswold and Polensky at Bell Labratories

160. What is SNOBOL famous for?
- Text-processing. Has powerful operations for string pattern matching

161. SNOBOL is used for writing _____ ______.
- Text editors

162. What was SIMULA I designed for?
- Simulation

163. Who developed SIMULA I?
- Kristen Nygaard and Ole-Jahn Dah

164. Which language was the first to support data-abstraction?
- SIMULA 67

165. Why was data-abstraction created in SIMULA 67?
- To support coroutines

166. What were the primitive data types in ALGOL 68?
- Boolean, Character, Integer, Real and Complex

167. What did ALGOL 68 introduce?
- Implicit heap-dynamic arrays (flex arrays) where array length is not specified

168. All modern languages owe some of their design to _____ or ______.
- ALGOL 60 or ALGOL 68

169. Who developed Pascal?
- Niklaus Wirth

170. True or False? Pascal became the most widely used introductory language.
- True

171. True or False? Pascal is safe when compared to Fortran or C.
- True

172. Who developed C?
- Dennis Ritchie

173. Why was C originally developed?
- For systems programming

174. What is a reason for C’s popularity?
- UNIX is written in C

175. True or False? C has type-checking
- False

176. What programming language category does Prolog fall under?
- Logic

177. Who developed Prolog?
- Robert Kowalski

178. Prolog consisted of two types of statements: ______ and ______.
- facts and rules 

179. Prolog uses ________ to attempt to determine the truth of the statement.
- resolution

180. What was the most expensive and extensive design effort ever undertaken for a programming language?
- Ada

181. Who developed Ada?
- Jean Ichbiah

182. Why was Ada created?
- DoD contest. DoD wanted a programming language for embedded systems.

183. Where did Ada get its name from?
- Augusta Ada Byron

184. Who is considered to be the first programmer?
- Augusta Ada Byron

185. What were the major contributions of Ada?
- Packages
- Exception Handling
- Generic packages and subprograms
- Tasks

186. Why was Ada criticized?
- Too large and complex

187. Is Ada still required by the DoD for its military software systems?
- No

188. What features became available in Ada 95?
- Protected objects
- Extended type that supports inheritance and polymorphism

189. What type of interface does Ada 2005 have?
- Similar to Java

190. What was the first language to fully support OOP?
- Smalltalk

191. Who developed Smalltalk?
- Alan Kay

192. What platform was Smalltalk to be used on?
- Dynabook (similar to large iPad)

193. How is all computing done in Smalltalk?
- By sending a message to an object to invoke one of its methods and the method replies by returning an object.

194. True or False? Classes in Smalltalk belong to a single class hierarchy?
- True

195. Who developed C++?
- Bjarne Stroustrup at Bell Laboratories

196. True or False? C++ allows for procedural and OOP programming?
- True

197. True or False? C++ inherited most of C’s insecurities.
- True

198. True or False? You can link C++ code with C code.
- True

199. Name a couple of features present in C++.
- Parameter type checking
- Classes
- Public/private access control of inherited components
- Constructors and Destructors

200. True or False? C++ allows multiple inheritance.
- True

201. Who developed Objective-C?
- Brand Cox and Tom Love

202. True or False? Objective-C was used to write MAC OS X.
- True

203. True or False? Objective-C is a strict superset of C
- True

204. True or False? Objective-C is a hybrid language with imperative and object-oriented features.
- True

205. Who developed Java?
- James Gosling

206. What is Java useful for?
- Web programming especially with Java applets. 

207. Does Java support concurrency?
- Yes. They’re called threads.

208. How are objects in heap deallocated in Java?
- Automatically via garbage collection.

209. What does garbage collection help avoid?
- Memory leaks

210. True or False? Java is faster than C.
- False since C is compiled and Java is a hybrid-implementation language

211. Name a few reasons for Java’s fast implementation.
- Applets, Simpler and safer than C++, Compiler is free and easy to obtain

212. True or False? Java has generics.
- True

213. Who developed Perl?
- Larry Wall

214. In Perl, variables are _______ declared.
- Implicitly 

215. What are the first characters in Perl’s variable types: scalar, array, hash
- S – Scalar
- @ - Array 
- % - Hash names

216. True or false? Arrays have dynamic length in Perl.
- True

217. What are associative arrays called?
- Hashes

218. What are hashes?
- Hash tables in which keys are stored

219. True or False? Perl was initially a UNIX utility for processing text files.
- True

220. Who developed JavaScript?
- Brendan Eich

221. True or False? JavaScript is standardized.
- True

222. What is JavaScript standardized name?
- ECMAScript

223. What is Microsoft’s version of JavaScript called?
- Jscript

224. Where is JavaScript’s interpreter located?
- Web browser

225. What is JavaScript used for?
- Form validation and dynamic modification of HTML documents

226. True or False? JavaScript supports inheritance.
- False

227. Who developed PHP?
- Rasmus Lerdorf

228. Where is PHP interpreted?
- Web Server

229. True or False? PHP supports OOP.
- True

230. Who developed Python?
- Guido van Rossum

231. True or False? Python is interpreted.
- True

232. Is Python dynamically typed?
- Yes

233. Is Python Object Oriented?
- Yes

234. What are Python’s data structures?
- Tuples, Lists and Dictionaries

235. Does Python have garbage collection?
- Yes

236. Does Python support exception handling?
- Yes

237. Does Python support concurrency?
- Yes

238. Does Python support network programming?
- Yes

239. What was the first programming language designed in Japan to have widespread use in the US?
- Ruby

240. Who developed Ruby?
- Yukihiro Matsumoto

241. True or False? Ruby is object oriented.
- True

242. True or False? In Ruby, classes and objects are dynamic.
- True

243. How is scope specified in Ruby?
- In name. Local variables begin with letter. Instance variables begin with @. Global with $.

244. Lua supports ________ and _________ programming.
- Imperative and functional

245. Does Lua support OOP?
- No

246. What is Lua’s data structure?
- Table (an associative array)

247. True or False? Lua is a hybrid language.
- True

248. Why was C# developed for?
- Component based software development

249. Who created C#?
- Anders Hejlsberg

250. What is the type delegate used for in C#?
- Implementing event handlers and callbacks

251. True or False? C# allows for auto-boxing and auto-unboxing.
- True

252. True or False? C# has a foreach statement.
- True

253. What is a markup programming hybrid language?
- A markup language in which some of the elements can specify programming actions.

254. What is syntax?
- The form of a language

255. What is "semantics"?
- The meaning of the expressions

256. True or False? Describing syntax is easier than describing semantics.
- True

257. The strings of a language are called ________.
- Sentences

258. _______ are the lowest level syntactic units
- Lexemes

259. A _________ of a language is a category of its lexemes
- Token

260. Languages can be formally defined in two distinct ways: by ______ and by _______.
- recognition and generation

261. The syntax part of a compiler is a _________ for the language.
- recognizer

262. What can regular grammars describe?
- appearance of tokens of programming languages

263. What can context-free grammars describe?
- the syntax of a whole programing language

264. What is a metalanguage?
- A language used to describe another language. 

265. True or False? BNF is a metalanguage for programming languages.
- True

266. Each rule in BNF has a Left Hand Side (LHS), or ________, and a Right Hand Side (RHS), or _________.
- nonterminal and terminal

267. What is grammar?
- Collection of rules

268. In BNF, multiple rules can be separated by ______.
- Vertical bar |

269. A rule is ______ if LHS appears on its RHS.
- recursive

270. A sentence of a language appears with a special nonterminal symbol called ____ ______.
- start symbol

271. What is a derivation?
- Sequence of rule applications where each successive string is derived from the previous string by replacing one of the nonterminals with one of the nonterminals definitions.

272. Each string in a derivation, including the start symbol, is called a _______ ________.
- sentential form

273. True or false? A derivation continues until the sentential form contains no nonterminals.
- True

274. A _____ ________ is one in which the replaced nonterminal is always the leftmost nonterminal.
- leftmost derivation

275. How can derivation be represented graphically?
- In a parse tree

276. What do nodes and leaves represent in a parse tree?
- Nodes: nonterminals
- Leaves: terminals

277. A grammar that generates a sentence for which there are two or more distinct parse trees is said to be _________.
- ambiguous

278. Every derivation with an unambiguous grammar has a ______ parse tree.
- unique

279. What a BNF rule has its LHS also appearing at the beginning of its RHS, the rule is said to be ___ __.
- Left recursive 

280. Left recursion corresponds to ______ _________.
- left associativity

281. What does a left-associative parse tree look like?
- Lowest branch appears on the left hand side

282. What is the rule for if constructs in most languages?
- That the else clause is matched with the nearest previous unmatched if

283. What are the three extensions present in EBNF?
- Square brackets, Curly braces, Parentheses

284. A right superscript to the right of the brace indicates what?
- the upper limit to the number of times the enclosed part can be repeated

285. What is used instead of an arrow in EBNF?
- A colon

286. True or False? Vertical bars are used to separate alternative RHSs.
- False. Place alt. RHS on new line. No vertical bars

287. What does attribute grammar describe?
- More of a structure of a programming language than is possible in context-free grammar

288. What are static semantics?
- Rules can be checked at compile time

289. True or false? Attribute grammar can describe both syntax and semantics?
- True

290. What are attributes?
- Properties that can have values assigned to them

291. What are synthesized attributes used for?
- Used to pass semantic information up a parse tree.

292. What are inherited attributes used for?
- Used to pass semantic information down and across a tree

293. If all of the attribute values in a parse tree are said to be computed, the tree is said to be ___ ___.
- fully attributed

294. What are intrinsic attributes?
- Synthesized attributes of leaf nodes whose values are determined outside of the parse tree.

295. What is an actual_type?
- a synthesized attribute that stores the actual type of a variable or expression.

296. What is an expected_type?
- Inherited attribute associated with nonterminal <expr> that stores the expected type of expression.

297. True or False? There is a universally accepted notation for describing dynamic semantics.
- False

298. What are operational semantics?
- An attempt to describe the meaning of a statement by specifying the effects of running it on a machine.

299. Is operational semantics based on mathematics?
- No

300. ________ _________ is based on recursive function theory.
- Denotational semantics

301. What is the most rigorous and most widely known formal method for describing the meaning of programs?
- Denotational semantics

302. In denotational semantics, each mapping function has a ____ and a ____.
- domain and range

303. In denotational semantics, the _____ _____ specifies which syntactic structures are to be mapped.
- Syntactic domain

304. In denotational semantics, the range is called the _________ _________.
- Semantic domain

305. The _______ in denotational semantics consists of the values of the program’s variables.
- state

306. Show how a state can be represented in denotational semantics.
- s = {<i1, v1>, <i2, v2>, …} where i = variable name and v = value

307. In denotational semantics, any name that’s not initialized with a value has the special value ___.
- undef

308. What does VARMP(i, s) produce?
- v

309. In denotational semantics, most constructs, such as expressions are mapped to ___ not states.
- values

310. What semantics have been used in programing language standards?
- Denotational semantics

311. What are axiomatic semantics?
- Most abstract technique for specifying semantics based on mathematical logic

312. What are axiomatic semantics used for?
- Proving the correctness of programs

313. What is an assertion?
- A logical expression that specifies constraints on program variables.

314. What is a precondition?
- An assertion that describes necessary constraints before the execution of a statement

315. What is a postcondition?
- An assertion that describes new constraints on program variables after statement execution

316. How are pre and post conditions represented?
- In curly braces

317. What is the weakest precondition?
- Least restrictive precondition

318. What is the inference rule?
- method of inferring the truth of one logical statement based on the truth of other logical statements.

319. What is the general form of the inference rule?
-  S1, S2, ......, Sx
------------------------
           S

320. What is an axiom?
- logical statement that is assumed to be true

321. What is the notation for specifying the axiomatic semantics of a statement form?
- {P} S {Q}

322. What does the rule of consequence state?
- Postcondition can always be weakened and a precondition can always be strengthened.

323. What do you need to find in order to compute the weakest precondition for a logical while loop?
- Loop invariant

Comments

  1. After doing all this learning let do some practical by Hacking

    Do complete hacking & do some practical for beginners to advanced levels users :- Click Here

    FREE!!

    ReplyDelete
  2. I think this is an informative post and it is very useful and knowledgeable. Really its Great Article. Keep it up. Here is a complete of web and mobile app development services Read here and know all the famous Software Development services.

    wordpress developers for hire

    ReplyDelete
  3. LBM Blockchain Solutions has built a reputation for service and support. We are a long-standing best crypto exchange development company in Mohali
    . We make sure to offer the best service possible to every esteemed client. Want to know more? Visit our official website now! - LBM Blockchain Solutions.

    ReplyDelete
  4. Hello sir
    I read your blog and You Are providing very Important and Useful Information to us. Keep it up. I am also a Blogger. I write blogs On the topic of Blockchain and Crypto Exchange. I Recently wrote a blog On How To Develop Your Own Crypto Token read The Blog and share your reviews .
    Thank you


    ReplyDelete
  5. hello sir
    I read your blog and your writing skills are amazing and you are providing us a lot of useful information. But if you are looking for QSR technology & communication, video surveillance solution, alarm security system, then Call High Mark is the best choice for you. We have over 25 years of experience in (QSR) technology and communication, we can make it easy for you.

    ReplyDelete
  6. Excellent article and this helps to enhance your knowledge regarding new things. Waiting for more updates.
    Visit: Best IOS App Development Company USA

    ReplyDelete
  7. Brightcareersolutions, being the best Python Training in Mohali, recognizes the new trends and offers the best Python training in Mohali.

    ReplyDelete
  8. Thanks For Sharing This Valuable content we are from Tamil Nadu at Dingul by the way we are the best digital marketing agency at Lebynd

    ReplyDelete

Post a Comment

Popular posts from this blog

Beginner Java Exercise: Sentinel Values and Do-While Loops

In my previous post on while loops, we used a loop-continuation-condition to test the arguments. In this example, we'll loop at a sentinel-controlled loop. The sentinel value is a special input value that tests the condition within the while loop. To jump right to it, we'll test if an int variable is not equal to 0. The data != 0 within the while (data != 0) { ... } is the sentinel-controlled-condition. In the following example, we'll keep adding an integer to itself until the user enters 0. Once the user enters 0, the loop will break and the user will be displayed with the sum of all of the integers that he/she has entered. As you can see from the code above, the code is somewhat redundant. It asks the user to enter an integer twice: Once before the loop begins, and an x amount of times within the loop (until the user enters 0). A better approach would be through a do-while loop. In a do-while loop, you "do" something "while" the condition

Programming Language Concepts Questions/Answers Part 3

1. What is an associative array? - An unordered collection of data elements that are indexed by keys. 2. Each element of an associative array is a pair consisting of a _______ and a _______. - key and a value 3. True or False? Java supports associative arrays? - True. As a matter of fact, Perl, Python, Ruby, C++, C# and F# do too. 4. What are associative arrays called in Perl? - hashes 5. Why are associative arrays in Perl called hashes? - Because their elements are stored and retrieved with a hash function 6. What character does a hash in Perl begin with? % 7. In Perl, each key is a _____ and each value is a _______. - string - scalar 8. In Perl, subscripting is done using _______ and _______. - braces and keys 9. In Perl, how are elements removed from hashes? - using delete 10. In Perl, the ________ operator tests whether a particular value is a key in a hash. - exists 11. What are associative arrays called in Python? - dictionaries 12. What is a dif

Creating your own ArrayList in Java

Wanted to show that certain data structures in Java can be created by you. In this example, we'll go ahead and create an ArrayList data structure that has some of the methods that the built in ArrayList class has. We'll create 2 constructors: The default constructor that creates an ArrayList with a default size of 10. Constructor that allows an initial size to be passed to the array. We'll also create a number of methods: void add(Object x);  A method that allows you to place an Object at the end of the ArrayList. void add(int index, Object x);  A method that allows you to place a value at a given location. Object get(int index):  Allows you to retrieve a value of the arrayList array from a given location. int size();  Allows you to get the number of elements currently in the Arraylist. boolean isEmpty();  Tests to see if the Arraylist is empty. boolean isIn(Object x);  A method that sees if a particular object exist in the arrayList. int find(Object x);