#1
What does the '++' operator do in programming?
Increment the value of a variable by 1
ExplanationIncreases the value of a variable by 1.
 #2
What does the 'for' loop typically consist of?
Initialization, condition, increment
ExplanationIncludes initialization, condition, and increment components.
 #3
What does the 'continue' statement do in a loop?
Skips the current iteration of the loop and moves to the next iteration
ExplanationBypasses the current loop iteration and advances to the next one.
 #4
What is the purpose of the 'break' statement in a loop?
To exit the loop
ExplanationExits the loop prematurely.
 #5
What is the purpose of the 'str()' function in Python?
Converts an integer to a string
ExplanationTransforms an integer into a string.
 #6
What is the result of the expression '3 + 2 * 4' in mathematics?
25
ExplanationIncorrect, the correct result is 11.
 #7
What is the purpose of the 'int()' function in Python?
Converts a string to an integer
ExplanationChanges a string to an integer.
 #8
What does the 'strlen()' function do in C programming?
Returns the length of a string
ExplanationProvides the length of a string.
 #9
In Python, what does the 'strip()' function do?
Removes leading and trailing whitespace
ExplanationEliminates leading and trailing whitespaces.
 #10
What is the result of '5 // 2' in Python?
2
ExplanationYields the floor division result of 5 by 2.
 #11
What does the 'enumerate()' function in Python do?
Returns an iterator of tuples containing index and value pairs
ExplanationGenerates tuples with index and value pairs.
 #12
What does the 'str.split()' method in Python do by default?
Splits a string into words
ExplanationDivides a string into words by default.
 #13
What is the output of 'print('hello'.capitalize())' in Python?
Hello
ExplanationCapitalizes the first letter of the string.
 #14
What does the 'str.join()' method in Python do?
Joins a list of strings into one string
ExplanationCombines strings from a list into one string.
 #15
What is the output of the following code snippet in Python: 'print('Hello'[1:])'?
ello
ExplanationPrints the substring starting from index 1.
 #16
In JavaScript, what does the 'toFixed()' method do?
Converts a number to a string, keeping a specified number of decimals
ExplanationChanges a number to a string with specified decimals.
 #17
What does the 'reduce()' function do in Python?
Performs aggregation on a list of elements
ExplanationAggregates elements in a list.
 #18
What does the 'filter()' function do in Python?
Filters a list of elements based on a given function
ExplanationSelects elements from a list based on a specified function.
 #19
What does the 'map()' function do in Python?
Applies a function to all the items in an input list
ExplanationApplies a function to each item in a list.