Programming Languages and Concepts Quiz
Test your knowledge of various programming languages, programming concepts, algorithms, and computer science history.
Questions
APL is a legacy programming language that quickly fell out of favor due to its unusual characteristics. What was it about APL that made it so strange by today's standards?
- You couldn't type APL code using the characters on an ordinary typewriter keyboard
- As a Mac OS-only language you couldn't program in APL without using a GUI editor
- APL had no concept of strings; text had to be processed and output one character at a time
- As the world's only Albanian Programming Language all APL's keywords were based on Albanian
Who is generally credited with being the first computer programmer?
- Blaise Pascal
- Ada Lovelace
- Jean-Benoit Fortran
- William Henry Gates II
Which of the following is a true statement about the C programming language?
- Method calls may return only one value but objects may contain any number of methods
- The reference count of an object must reach zero for garbage collection to take place
- All classes must be declared in header files before they can be instantiated as objects
- None of the above
What is a singleton?
- A class that is instantiated exactly once producing just one object of that class
- A complete program that takes up only one line of code
- A data structure such as a linked list that contains only one member
- None of the above
What makes parallel computing one of the more difficult disciplines for programmers to master?
- Race conditions can lead to data being corrupted in unexpected ways
- Inadequate memory management can lead to application deadlocks
- Too many threads or processes can actually decrease performance
- All of the above
Which of the following languages does NOT require every line of code to be terminated with a semicolon?
- Java
- C++
- Python
- All of the above
Which of the following is NOT a characteristic of functional programming languages?
- Functions can take other functions as arguments and return them as results
- Algorithms are expressed in natural mathematical terms rather than as procedural steps
- Every function must modify some kind of state - either within the machine or in the outside world
- Recursion is encouraged
What is a Turing machine?
- An abstract device that can simulate the logic of any conceivable computer algorithm
- Any mechanism that can simulate human intelligence sufficiently to fool a human
- A device used by early programmers to input punch cards into the computer
- Any of a number of machines derived from the first mechanical computing devices
In object-oriented programming why might you want to "serialize" an object?
- To sort its data structures in memory so that they can be accessed more quickly
- To ensure that it is thread-safe by eliminating any deadlocks or race conditions
- To break it into simpler subobjects known as "episodes"
- To convert it into a form that can be saved to persistent storage
Which of the following is NOT strictly speaking a programming language?
- SQL
- PostScript
- AppleScript
- Tcl
What is the first step to designing a recursive algorithm?
- Make sure all your subroutines are thread-safe
- Free all unallocated memory blocks
- Normalize your data model
- Determine the answer to question 8 above
C# is a language platform that is very similar to Java in many respects. If a programmer develops software in C# using Microsoft Visual Studio what is an equivalent tool for the Java platform?
- Subversion
- Apache Ant
- NetBeans
- Spring
Which of the following programming languages is a dialect of ECMAScript?
- ActionScript
- AppleScript
- PostScript
- VBScript
What is the first step to designing a recursive algorithm?
- Make sure all your subroutines are thread-safe
- Free all unallocated memory blocks
- Normalize your data model
- Determine the answer to question above
What is a main disadvantage of using statically linked libraries to build software executables?
- Linking libraries statically increases executable file size and leads to code redundancy
- Without dynamic linking the software cannot take advantage of higher-order functions
- The software becomes subject to the linked libraries' license terms which may include usage fees
- Lack of proper dynamic linking leads to library proliferation and increased "DLL hell"
The first-ever optimizing compiler was written to support which high-level programming language?
- Cobol
- Fortran
- C
- LISP
What is the maximum length of command line arguments including space between adjacent arguments
- 100
- 50
- 200
- 150
void main() { int x=20,y=35; x= y++ + x++; y= ++y + ++x; printf(" %d %d" , x,y); }
- x=57 & y=94
- x=57,y=55
- X = 57 Y= 93
- X = 37 Y= 65
void main(){ print(“%d”,printf(“What this prints”)) };
- Compile error
- What this prints
- 11
- 15