100 Code Riddles with answer
100 Code Riddles with Answers – Fun & Clever Programming
Share:

1. What language talks to computers using ones and zeros?
Answer: Binary

2. What tool do programmers use to catch errors before they escape?
Answer: Debugger

3. What loop keeps running until a condition becomes false?
Answer: While loop

4. What variable type stores true or false?
Answer: Boolean

5. What block of code can be called again and again?
Answer: Function

6. What structure stores many values under one name?
Answer: Array

7. What holds key–value pairs in tidy order?
Answer: Dictionary

8. What term describes a mistake in code?
Answer: Bug

9. What do you add to code so humans can understand it better?
Answer: Comments

10. What is the name of the collection of steps an algorithm follows?
Answer: Procedure

11. What section of code runs only when a condition is met?
Answer: If statement

12. What runs when the first condition is not met, but another might be?
Answer: Else-if

13. What returns data back from a function?
Answer: Return value

14. What tool compiles code into machine instructions?
Answer: Compiler

15. What tool translates code line by line during execution?
Answer: Interpreter

16. What do you call code that repeats the same result each time?
Answer: Deterministic

17. What concept hides internal details from the outside world?
Answer: Encapsulation

18. What concept allows objects to share traits of other objects?
Answer: Inheritance

19. What concept allows one function name to do many things?
Answer: Polymorphism

20. What concept restricts access to certain class members?
Answer: Access control

21. What operator checks if two values are equal?
Answer: Comparison operator

22. What loop repeats a set number of times?
Answer: For loop

23. What symbol is used to store text in programming?
Answer: String

24. What do programmers use to track versions of their code?
Answer: Git

25. What website stores remote repositories for developers?
Answer: GitHub

26. What command downloads a repository to your computer?
Answer: Clone

27. What do you create to store code changes before uploading?
Answer: Commit

28. What command uploads those changes to the remote repository?
Answer: Push

29. What command brings new changes from the remote repo?
Answer: Pull

30. What file stores configuration for dependencies?
Answer: Package file

31. What do you generate to fix code errors step-by-step?
Answer: Stack trace

32. What environment do developers use to write and organize code?
Answer: IDE

33. What shorthand piece of code runs once and is unnamed?
Answer: Anonymous function

34. What error occurs when code runs into something unexpected?
Answer: Runtime error

35. What error prevents a program from compiling?
Answer: Syntax error

36. What tool helps format code automatically?
Answer: Linter

37. What operator adds two values together?
Answer: Addition operator

38. What operator joins two strings?
Answer: Concatenation

39. What code piece executes when something happens, like a click?
Answer: Event handler

40. What keyword stops a loop immediately?
Answer: Break

41. What keyword skips to the next loop iteration?
Answer: Continue

42. What type of code runs inside a browser to create web pages?
Answer: JavaScript

43. What language gives structure and layout to web pages?
Answer: HTML

44. What language designs how web pages look?
Answer: CSS

45. What tool makes websites work even without internet?
Answer: Service worker

46. What file contains rules for website styling?
Answer: Stylesheet

47. What attribute lets elements identify themselves uniquely?
Answer: ID

48. What attribute groups multiple HTML elements together?
Answer: Class

49. What stack includes HTML, CSS, and JavaScript?
Answer: Web stack

50. What format stores data using curly braces?
Answer: JSON

51. What data format is similar to JSON but uses XML tags?
Answer: XML

52. What protocol sends data between browsers and servers?
Answer: HTTP

53. What secure version of that protocol encrypts data?
Answer: HTTPS

54. What code piece runs on the server instead of the browser?
Answer: Backend

55. What code runs in the browser instead of the server?
Answer: Frontend

56. What database stores data in tables?
Answer: SQL database

57. What command retrieves information from a table?
Answer: SELECT

58. What command adds new information to a table?
Answer: INSERT

59. What command changes existing information?
Answer: UPDATE

60. What command removes information?
Answer: DELETE

61. What database stores flexible documents instead of tables?
Answer: NoSQL database

62. What coding principle means “don’t repeat yourself”?
Answer: DRY

63. What coding idea means keeping functions focused on one task?
Answer: Single responsibility

64. What error pops up when you divide by zero?
Answer: Arithmetic error

65. What structure stores data in last-in-first-out order?
Answer: Stack

66. What structure stores data in first-in-first-out order?
Answer: Queue

67. What structure connects nodes with links?
Answer: Linked list

68. What branching structure stores data with parents and children?
Answer: Tree

69. What complex structure connects nodes without a central root?
Answer: Graph

70. What algorithm sorts items by comparing pairs repeatedly?
Answer: Bubble sort

71. What search method splits the search area in half repeatedly?
Answer: Binary search

72. What algorithm finds the shortest path between nodes?
Answer: Dijkstra’s algorithm

73. What code tool tests functions automatically?
Answer: Unit test

74. What happens when tests run every time code changes?
Answer: Continuous integration

75. What system deploys updated code automatically?
Answer: Continuous delivery

76. What do developers create to manage app builds?
Answer: Build pipeline

77. What cloud service hosts backend code?
Answer: Serverless function

78. What virtual place stores files instead of your device?
Answer: Cloud storage

79. What trick allows multiple tasks to run at once?
Answer: Multithreading

80. What do you call requests waiting to be processed?
Answer: Queue jobs

81. What tool documents API endpoints?
Answer: Swagger

82. What key allows access to restricted API data?
Answer: API key

83. What message format do APIs commonly respond with?
Answer: JSON object

84. What wraps many files into one downloadable package?
Answer: Zip file

85. What code steals CPU time by never ending?
Answer: Infinite loop

86. What error happens when memory overfills?
Answer: Memory leak

87. What structure holds data indexed by characters?
Answer: Hash map

88. What model routes requests to controllers for web apps?
Answer: MVC

89. What technique sends partial page updates?
Answer: AJAX

90. What system automates deployment using containers?
Answer: Kubernetes

91. What lightweight container system packages apps?
Answer: Docker

92. What language is known for its snake mascot?
Answer: Python

93. What language is known for running inside browsers everywhere?
Answer: JavaScript

94. What language powers Android development natively?
Answer: Kotlin

95. What language is known for its strict type system and speed?
Answer: C++

96. What language compiles to bytecode for the JVM?
Answer: Java

97. What language is famous for safety and speed by design?
Answer: Rust

98. What language is used for smart contracts on blockchain?
Answer: Solidity

99. What challenge programmers love solving in 24-hour contests?
Answer: Hackathon

100. What do programmers celebrate after finally fixing a giant bug?
Answer: Deployment success