Discussly

Computer Trivia Questions for College Students — page 2

212 trivia questions with answers, college. Multiple-choice trivia with answers, sorted by topic and level. Reveal the answers below, pick one at random, or present them full-screen.

CollegeTriviaPage 2 of 5
  1. 51.

    Statement 1| For a continuous random variable x and its probability distribution function p(x), it holds that 0 ≤ p(x) ≤ 1 for all x. Statement 2| Decision tree is learned by minimizing information gain.

    • ATrue, True
    • BTrue, False
    • CFalse, True
    • DFalse, False
    Answer: False, False
  2. 52.

    Which of the following is usually NOT represented in a subroutine's activation record frame for a stack-based programming language?

    • AValues of local variables
    • BA heap area
    • CStack pointer for the calling activation record
    • DThe return address
    Answer: A heap area
  3. 53.

    Hash tables can contribute to an efficient average-case solution for all of the problems described below EXCEPT:

    • ACounting distinct values: Given a set of n keys, determine the number of distinct key values.
    • BSymbol table lookup: Given a program identifier, find its type and address.
    • CRange search: Given values a and b, find all the records whose key value is in the range a, b.
    • DDynamic dictionary: Support the operations of insert, delete, and search in a dictionary.
    Answer: Range search: Given values a and b, find all the records whose key value is in the range a, b.
  4. 54.

    Suppose your model is overfitting. Which of the following is NOT a valid way to try and reduce the overfitting?

    • AImprove the optimisation algorithm being used for error minimisation.
    • BDecrease the model complexity.
    • CIncrease the amount of training data.
    • DReduce the noise in the training data.
    Answer: Improve the optimisation algorithm being used for error minimisation.
  5. 55.

    The stack is memory for storing

    • ALocal variables
    • BGlobal variables
    • CDynamically linked libraries
    • DProgram code
    Answer: Local variables
  6. 56.

    Of the following sorting algorithms, which has a running time that is LEAST dependent on the initial ordering of the input?

    • ASelection sort
    • BQuicksort
    • CInsertion sort
    • DMerge sort
    Answer: Merge sort
  7. 57.

    When does a buffer overflow occur, generally speaking?

    • Awhen a pointer is used to access memory not allocated to it
    • Bwhen copying a buffer from the stack to the heap
    • Cwhen the program notices a buffer has filled up, and so starts to reject requests
    • Dwhen writing to a pointer that has been freed
    Answer: when a pointer is used to access memory not allocated to it
  8. 58.

    Which of the following is not a transport layer vulnerability?

    • AOverloading of transport-layer mechanisms
    • BUnauthorized network access
    • CThe Vulnerability that allows "fingerprinting" & other enumeration of host information
    • DMishandling of undefined, poorly defined variables
    Answer: Unauthorized network access
  9. 59.

    Let F: K \times R \to MF:K×R→M be a secure PRF. For m \in Mm∈M define E(k,m) = \big[ r \gets R,\ \text{output } \big(r,\ F(k,r) \oplus m\big)\ \big]E(k,m)=[r←R, output (r, F(k,r)⊕m) ] Is EE symantically secure under CPA?

    • AIt depends on what F is used
    • BYes, whenever F is a secure PRF
    • CNo, there is always a CPA attack on this system
    • DYes, but only if R is large enough so r never repeats (w.h.p)
    Answer: Yes, but only if R is large enough so r never repeats (w.h.p)
  10. 60.

    Why would a ping sweep be used?

    • ATo locate live systems
    • BTo identify live systems
    • CTo identify open ports
    • DTo locate firewalls
    Answer: To identify live systems
  11. 61.

    A packet filter firewall filters at the

    • APhysical Layer
    • BData link layer
    • CNetwork or transport layer
    • DApplication or transport
    Answer: Network or transport layer
  12. 62.

    Which of the following sentence is FALSE regarding regression?

    • AIt discovers causal relationships
    • BIt relates inputs to outputs.
    • CIt is used for prediction.
    • DIt may be used for interpretation.
    Answer: It discovers causal relationships
  13. 63.

    K-fold cross-validation is

    • Aexponential in K
    • Bquadratic in K
    • Clinear in K
    • Dcubic in K
    Answer: linear in K
  14. 64.

    If a malicious process is granted temporary administrator-level access to a system

    • Athe threat is over after the operating system is rebooted
    • Bthe thread is over after rebooting the machine and replacing files that show a virus infection
    • Cthe threat is over as soon as the process is killed
    • Dthe threat is often permanent until the entire disk is wiped clean
    Answer: the threat is often permanent until the entire disk is wiped clean
  15. 65.

    Which of the following are most vulnerable to injection attacks?

    • ASQL queries based on user input
    • BSession IDs
    • CNetwork communications
    • DRegistry keys
    Answer: SQL queries based on user input
  16. 66.

    Which of the following does authorization aim to accomplish?

    • ADetermine who the user is
    • BRestrict what operations/data the user can access
    • CDetermine if the user is an attacker
    • DFlag the user if he/she misbehaves
    Answer: Restrict what operations/data the user can access
  17. 67.

    What does EXE do when the STP solver times out on a constraint query for a particular path?

    • ARemove a subset of the constraints and retry the query.
    • BAssume that the query is not satisfiable and stop executing the path
    • CRestart STP and retry the query, up to a limited number of retries.
    • DAssume that the query is satisfiable and continue executing the path.
    Answer: Assume that the query is not satisfiable and stop executing the path
  18. 68.

    Statement 1| Linear regression estimator has the smallest variance among all unbiased estimators. Statement 2| The coefficients α assigned to the classifiers assembled by AdaBoost are always non-negative.

    • ATrue, False
    • BFalse, False
    • CFalse, True
    • DTrue, True
    Answer: False, True
  19. 69.

    The disadvantage of Grid search is

    • AIt can not be applied to non-differentiable functions.
    • BIt is hard to implement.
    • CIt runs reasonably slow for multiple linear regression.
    • DIt can not be applied to non-continuous functions.
    Answer: It runs reasonably slow for multiple linear regression.
  20. 70.

    What is the rank of the following matrix? A = [[1, 1, 1], [1, 1, 1], [1, 1, 1]]

    • A2
    • B3
    • C0
    • D1
    Answer: 1
  21. 71.

    What are the types of scanning?

    • AServer, client, and network
    • BNetwork, vulnerability, and port
    • CPassive, active, and interactive
    • DPort, network, and services
    Answer: Network, vulnerability, and port
  22. 72.

    SHA-1 has a message digest of

    • A628 bits
    • B820 bits
    • C160 bits
    • D512 bits
    Answer: 160 bits
  23. 73.

    What is a replay attack?

    • AAn attack that uses the system's own messages and so cannot be defended against
    • BWhen the attacker replies to a message sent to it by the system
    • CThe attacker resends a captured message, and the site accept its and responds in the attacker's favor
    • DAn attack that continuously repeats, probing for a weakness
    Answer: The attacker resends a captured message, and the site accept its and responds in the attacker's favor
  24. 74.

    Consider the Bayesian network given below. How many independent parameters would we need if we made no assumptions about independence or conditional independence H -> U <- P <- W?

    • A15
    • B4
    • C3
    • D7
    Answer: 15
  25. 75.

    What is the dimensionality of the null space of the following matrix? A = [[3, 2, −9], [−6, −4, 18], [12, 8, −36]]

    • A2
    • B3
    • C1
    • D0
    Answer: 2
  26. 76.

    Let HH be a Merkle-Damgard hash function is H:X^{\leq L} \to TH:X^≤L →T. Construct a MAC from this HH as follows: \ \ S(k,m) = H(k \| m) S(k,m)=H(k∥m). This mac is insecure because:

    • AGiven H(k \| m)H(k∥m) anyone can compute H(w \| k \| m \| \text{PB})H(w∥k∥m∥PB) for any ww
    • BGiven H(k \| m)H(k∥m) anyone can compute H(k \| m \| \text{PB} \| w)H(k∥m∥PB∥w) for any ww
    • CGiven H(k \| m)H(k∥m) anyone can compute H(k \| m \| w)H(k∥m∥w) for any ww
    • DAnyone can compute H( k \| m )H(k∥m) for any mm
    Answer: Given H(k \| m)H(k∥m) anyone can compute H(k \| m \| \text{PB} \| w)H(k∥m∥PB∥w) for any ww
  27. 77.

    A session symmetric key between two parties is used

    • AConditions dependant
    • BOnly once
    • CMultiple times
    • DTwice
    Answer: Only once
  28. 78.

    What is a nop sled

    • AIt is an anonymous version of a mop sled
    • BIt is a sequence of nops preceding injected shellcode, useful when the return address is unknown
    • CIt is another name for a branch instruction at the end of sequence of nops
    • DIt is a method of removing zero bytes from shellcode
    Answer: It is a sequence of nops preceding injected shellcode, useful when the return address is unknown
  29. 79.

    Which of the following is NOT a reasonable justification for choosing to busy-wait on an asynchronous event?

    • AA busy-wait loop is easier to code than an interrupt handler.
    • BThe program executes on a time-sharing system.
    • CThe wait is expected to be short.
    • DThere is no other work for the processor to do.
    Answer: The program executes on a time-sharing system.
  30. 80.

    Suppose we would like to perform clustering on spatial data such as the geometrical locations of houses. We wish to produce clusters of many different sizes and shapes. Which of the following methods is the most appropriate?

    • AModel-based clustering
    • BK-means clustering
    • CDensity-based clustering
    • DDecision Trees
    Answer: Density-based clustering
  31. 81.

    A hash function guarantees the integrity of a message. It guarantees that the message has not be

    • AViolated
    • BChanged
    • COverview
    • DReplaced
    Answer: Changed
  32. 82.

    Existential risks posed by AI are most commonly associated with which of the following professors?

    • AStuart Russell
    • BYann LeCun
    • CNando de Frietas
    • DJitendra Malik
    Answer: Stuart Russell
  33. 83.

    Which Nmap scan is does not completely open a TCP connection?

    • AXMAS tree scan
    • BTCP connect
    • CACK scan
    • DSYN stealth scan
    Answer: SYN stealth scan
  34. 84.

    Which of the following is NOT supervised learning?

    • ALinear Regression
    • BNaive Bayesian
    • CDecision Tree
    • DPCA
    Answer: PCA
  35. 85.

    Let A be a finite set with m elements, and let B be a finite set with n elements. The number of distinct functions mapping A into B is

    • An!/(n - m)!
    • Bn!
    • Cn!/(m!(n - m)!)
    • Dn^m
    Answer: n^m
  36. 86.

    Why is it that the compiler does not know the absolute address of a local variable?

    • ACompiler writers are not very good at that sort of thing
    • BThe size of the address depends on the architecture the program will run on
    • CAs a stack-allocated variable, it could have different addresses depending on when its containing function is called
    • DPrograms are not allowed to reference memory using absolute addresses
    Answer: As a stack-allocated variable, it could have different addresses depending on when its containing function is called
  37. 87.

    Which of the following algorithms has running time Θ(n^2) in the worst case but Θ(n log n) on average?

    • AHeapsort
    • BBubblesort
    • CQuicksort
    • DMergesort
    Answer: Quicksort
  38. 88.

    High entropy means that the partitions in classification are

    • Auseful
    • Bpure
    • Cnot pure
    • Duseless
    Answer: not pure
  39. 89.

    Which of the following can only be used when training data are linearly separable?

    • ALinear Logistic Regression.
    • BLinear hard-margin SVM.
    • CLinear Soft margin SVM.
    • DThe centroid method.
    Answer: Linear hard-margin SVM.
  40. 90.

    Three of the following are classic security properties; which one is not?

    • AConfidentiality
    • BIntegrity
    • CCorrectness
    • DAvailability
    Answer: Availability
  41. 91.

    Which PyTorch 1.8 command(s) produce $10\times 5$ Gaussian matrix with each entry i.i.d. sampled from $\mathcal{N}(\mu=5,\sigma^2=16)$ and a $10\times 10$ uniform matrix with each entry i.i.d. sampled from $U[-1,1)$?

    • A\texttt{5 + torch.randn(10,5) * 4} ; \texttt{2 * torch.rand(10,10) - 1}
    • B\texttt{5 + torch.randn(10,5) * 16} ; \texttt{torch.rand(10,10,low=-1,high=1)}
    • C\texttt{torch.normal(torch.ones(10,5)*5,torch.ones(5,5)*16)} ; \texttt{2 * torch.rand(10,10) - 1}
    • D\texttt{5 + torch.randn(10,5) * 16} ; \texttt{(torch.rand(10,10) - 0.5) / 0.5}
    Answer: \texttt{5 + torch.randn(10,5) * 4} ; \texttt{2 * torch.rand(10,10) - 1}
  42. 92.

    The AH Protocol provides source authentication and data integrity, but not

    • ABoth A & C
    • BIntegrity
    • CNonrepudiation
    • DPrivacy
    Answer: Privacy
  43. 93.

    Can a stream cipher have perfect secrecy?

    • AYes, every cipher has perfect secrecy
    • BYes, if the PRG is really "secure"
    • CNo, since the key is shorter than the message
    • DNo, there are no ciphers with perfect secrecy
    Answer: No, since the key is shorter than the message
  44. 94.

    Which of the following points would Bayesians and frequentists disagree on?

    • AThe use of probabilistic modelling for regression.
    • BThe use of class priors in Gaussian Discriminant Analysis.
    • CThe use of prior distributions on the parameters in a probabilistic model.
    • DThe use of a non-Gaussian noise model in probabilistic regression.
    Answer: The use of prior distributions on the parameters in a probabilistic model.
  45. 95.

    TCP protocol is responsible (among other things) for

    • ADealing with differences among operating system architectures
    • BReliable delivery of large (multi-packet) messages between machines that are not necessarily directly connected
    • CReliable delivery of packets between directly connected machines
    • DRouting packets through the network
    Answer: Reliable delivery of large (multi-packet) messages between machines that are not necessarily directly connected
  46. 96.

    Which of the following does authentication aim to accomplish?

    • AFlag the user if he/she misbehaves
    • BDetermine if the user is an attacker
    • CDetermine who the user is
    • DRestrict what operations/data the user can access
    Answer: Determine who the user is
  47. 97.

    A starvation-free job-scheduling policy guarantees that no job waits indefinitely for service. Which of the following job-scheduling policies is starvation-free?

    • ARound-robin
    • BShortest job first
    • CPriority queuing
    • DYoungest job first
    Answer: Round-robin
  48. 98.

    The message must be encrypted at the sender site and decrypted at the

    • AReceiver site
    • BSite
    • CSender Site
    • DConferencing
    Answer: Receiver site
  49. 99.

    Statement 1| Overfitting is more likely when the set of training data is small. Statement 2| Overfitting is more likely when the hypothesis space is small.

    • AFalse, False
    • BTrue, False
    • CTrue, True
    • DFalse, True
    Answer: False, True
  50. 100.

    Suppose we have the following objective function: $\argmin_{w} \frac{1}{2} \norm{Xw-y}^2_2 + \frac{1}{2}\gamma \norm{w}^2_2$ What is the gradient of $\frac{1}{2} \norm{Xw-y}^2_2 + \frac{1}{2}\lambda \norm{w}^2_2$ with respect to $w$?

    • A$\nabla_w f(w) = (X^\top X + \lambda I)w - X^\top y + \lambda w$
    • B$\nabla_w f(w) = X^\top X w - X^\top y + \lambda w$
    • C$\nabla_w f(w) = X^\top X w - X^\top y + (\lambda+1) w$
    • D$\nabla_w f(w) = X^\top X w - X^\top y + \lambda$
    Answer: $\nabla_w f(w) = X^\top X w - X^\top y + \lambda w$

How to use these trivia questions

  • Warm-up. Open a lesson or meeting with 3–5 questions — enough to wake the room, short enough to keep the agenda.
  • Review game. Pick 10 questions on the topic you just taught and play them in teams; discuss every wrong answer.
  • Quiz night. Mix two or three topics, read each question twice, and give 20 seconds before revealing the answer.

Run them live

Want every person to answer on their own phone, with a timer and a live leaderboard? Use these questions in an EngageSlide Quiz with a live leaderboard — free to start.

Tick questions on any page — your set is kept while you browse (or take the first 10 here) — and they become ready-to-play slides. What is EngageSlide?

More question collections

Questions adapted from MMLU (Hendrycks et al.) (MIT), edited for clarity. This collection may be reused under the same terms — see sources & licenses.