Learning Objectives of Problets
Learning objectives are subconcepts that are at an independently
assessable level of granularity. Each problet targets a specific set
of learning objectives. We have listed the learning objectives
currently targeted by the various problets below:
- Correct evaluation of the 5 operators
- Precedence of the 5 operators
- Associativity of the 5 operators
- Coercion of operands
- Integer and real division
- Inapplicability of real operands to the modulus operator
% Division by zero error for division and modulus operators
- Correct evaluation of the 6 operators
- Precedence of the 6 operators
- Associativity of the 6 operators
- Precedence of relational operators with respect to arithmetic operators
- Equivalence of non-zero numbers and true, zero and false in C/C++
- Correct evaluation of the 3 operators, without and with
short-circuit evaluation
- Precedence of the 3 operators
- Associativity of the 3 operators
- Precedence of logical operators with respect to relational operators
- Equivalence of non-zero numbers and true, zero and false in C/C++
- Correct evaluation of simple, self-referential and compound assignment operators
- Correct evaluation of prefix increment and decrement operators
- Correct evaluation of postfix increment and decrement operators
- Widening and narrowing coercion during assignment
- Precedence of all the types of assignment operators
- Associativity of simple and compound assignment operators,
and prefix operators (only in C++)
- Execution of an if-else statement when the condition is true
- Execution of an if-else statement when the condition is false
- Cascaded nested if-else statement
- Nested if-else statement used for classification
- Multiple back-to-back if-else statements in a program
- Execution of an if statement when the condition is true
- Execution of an if statement when the condition is false
- Execution of if statement where the condition involves declaration of a variable
- Execution of if statement with a constant or expression as the condition
- Nested if statements
- Multiple back-to-back if statements in a program
- Execution of a switch statement when the condition matches a case
- Execution of a switch statement when the condition matches the default case
- Execution of a switch statement with no default case when the condition matches no case
- The condition of the switch statement is of real data type
- A case statement in the switch is not an integer expression
- A case statement in the switch is not a constant expression
- Condition of the switch is an expression
- A case with no statements
- A case with no break statement
- Nested switch statements in a program
- Multiple back-to-back switch statements in a program
- Execution of a while loop wherein one loop variable is changed on each iteration
- Execution of a while loop wherein multiple loop variables change on each iteration
- Execution of a while loop wherein the loop variable is updated at the top of the loop body
- while loop with follow-up statements after the loop
- while loop that iterates zero times
- while loop that iterates exactly once
- Independent nested while loops
- Dependent nested while loops - inner loop condition is affected by the outer loop
- Execution of a for loop wherein the loop variable is incremented on each iteration
- Execution of a for loop wherein the loop variable is decremented on each iteration
- for loop whose body is a simple statement
- Execution of a for loop wherein the loop variable is also updated at the top of the loop body
- for loop with follow-up statements after the loop
- for loop that iterates zero times
- for loop that iterates exactly once
- Independent nested for loops
- Dependent nested for loops - inner loop condition is affected by the outer loop
- Behavior of break statement in a loop
- Behavior of break statement in a nested loop
- Behavior of continue statement in a loop
- Use of break statement outside loops and switch statements is illegal
- Use of continue statement outside loops is illegal
- Infinite loops resulting from:
- Missing update of loop condition variable
- Incorrect update of loop condition variable
- Condition is an assignment/constant (C++)
- Behavior of multiple dependent loops of different types in a program
- Behavior of nested dependent loops of different types in a program
- Use of accumulator variables in a loop
- Parameters passed by value
- The actual parameter is a variable
- The actual parameter is a constant or expression
- The value returned by a function
- Function with multiple return statements
- Calls to multiple functions
- Multiple calls to a function
- Chained function calls
- Variables with the same name in different functions
- Mismatch in the number of actual and formal parameters
- Mismatch in the data types of actual and formal parameters
- Value returned by a function is ignored in the caller
- Caller tries to use the value returned by a void-function
- return statement missing in a non-void function
- return statement is not the last statement in the function
- Mismatch in the returned value and return type of a function
- Re-declaration of formal parameters in a function
- Function is called before defined or prototyped (C++ only)
- Initialization of arrays
- Accessing uninitialized (C/C++) versus default-initialized (Java/C#) array elements
- Random versus systematic assignment to array elements
- Random versus systematic referencing of array elements
- Expressions as array subscripts
- Self-referential assignment to array elements
- Passing an entire array (by reference) or an element of an array as parameter to a function
- Mismatch in array parameters passed to functions
- Accessing an array out of bounds
- Dangling pointer: Dereferencing a pointer before initializing/allocating
- Dangling pointer: Dereferencing a pointer after the variable to which it points goes out of scope
- Lost object
- Syntax error: Accessing a pointer out of its scope
- Semantic error: Referencing a variable to which a pointer points before initializing its value
- Semantic error: Referencing an anonymous variable to which a pointer points before initializing its value
- Correct use of pointers
Amruth Kumar, amruth@ramapo.edu