// Numbering of templates for different bitwise operators: // Bitwise.& - Total 56 templates // Bitwise.&.Correct - 100 // Bitwise.&.Precedence.Bitwise - 125 // Bitwise.&.Precedence.Other - 150 // Bitwise.&.Associativity - 175 // Bitwise.| - Total 56 templates // Bitwise.|.Correct - 200 // Bitwise.|.Precedence.Bitwise - 225 // Bitwise.|.Precedence.Other - 250 // Bitwise.|.Associativity - 275 // Bitwise.^ - Total 56 templates // Bitwise.^.Correct - 300 // Bitwise.^.Precedence.Bitwise - 325 // Bitwise.^.Precedence.Other - 350 // Bitwise.^.Associativity - 375 // Bitwise.~ - Total 30 templates // Bitwise.~.Correct - 400 // Bitwise.~.Precedence.Bitwise - 425 // Bitwise.~.Precedence.Other - 450 // Bitwise.~.Associativity - 475 // Bitwise.<< - Total 38 templates // Bitwise.<<.Correct - 500 // Bitwise.<<.Precedence.Bitwise - 525 // Bitwise.<<.Precedence.Other - 550 // Bitwise.<<.Associativity - 575 // Bitwise.>> - Total 38 templates // Bitwise.>>.Positive.Correct - 600 // Bitwise.>>.Negative.Correct - 625 // Bitwise.>>.Precedence.Bitwise - 650 // Bitwise.>>.Precedence.Other - 675 // Bitwise.>>.Associativity - 700 // Bitwise.Incorrect operand type for bitwise operator - 725 // Bitwise.&.Incorrect operand type for bitwise operator // Bitwise.|.Incorrect operand type for bitwise operator // Bitwise.^.Incorrect operand type for bitwise operator // Bitwise.~.Incorrect operand type for bitwise operator // Bitwise.<<.Incorrect operand type for bitwise operator // Bitwise.>>.Incorrect operand type for bitwise operator // Bitwise.Parenthesis - Total 27 templates // Bitwise.Parenthesis.Precedence - 750 // Bitwise.Parenthesis.Associativity - 775 // Bitwise.>>> - Total 38 templates // Bitwise.>>>.Correct - 800 // Bitwise.>>>.Precedence.Bitwise - 825 // Bitwise.>>>.Precedence.Other - 850 // Bitwise.>>>.Associativity - 875 // Bitwise.>>>.Incorrect operand type for bitwise operator - Eliminated // // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- // Bitwise.& - Total 56 templates // Bitwise.&.Correct - 100 // Bitwise.&.Precedence.Bitwise - 125 // Bitwise.&.Precedence.Other - 150 // Bitwise.&.Associativity - 175 // Both operands nonnegative // small & large # 100 Bitwise.&.Correct > & // 42 & 78 > Type: expression Hardness: 10 // large & small # 101 Bitwise.&.Correct > & // 85 & 38 > Type: expression Hardness: 10 // same operand twice # 102 Bitwise.&.Correct > & // 56 & 56 > Type: expression Hardness: 10 // one operand is all 0s # 103 Bitwise.&.Correct > 0 & // 0 & 71 > Type: expression Hardness: 10 // one operand has all 1s in the right 7 digits # 104 Bitwise.&.Correct > & 127 // 53 & 127 > Type: expression Hardness: 10 // One or more operand negative // positive & negative # 110 Bitwise.&.Correct > & // 73 & -73 > Type: expression Hardness: 15 // negative & positive # 111 Bitwise.&.Correct > & // -58 & 45 > Type: expression Hardness: 15 // negative & negative # 112 Bitwise.&.Correct > & // -80 & -40 > Type: expression Hardness: 15 // same operand # 113 Bitwise.&.Correct > & // -57 & -57 > Type: expression Hardness: 15 // same operand positive & negative # 114 Bitwise.&.Correct > & // -66 & 66 > Type: expression Hardness: 15 // negative & 0 # 115 Bitwise.&.Correct > & 0 // -77 & 0 > Type: expression Hardness: 15 // -1 & negative # 116 Bitwise.&.Correct > -1 & // -1 & -66 > Type: expression Hardness: 15 // -------------------------------------------------------------------------- // Bitwise.&.Precedence.Bitwise - 125 // Precedence with respect to other bitwise operators // Precedence & and | # 125 Bitwise.&.Precedence.Bitwise ? Bitwise.|.Precedence.Bitwise > | & // 74 | 36 & 42 > Type: expression Hardness: 20 # 126 Bitwise.&.Precedence.Bitwise ? Bitwise.|.Precedence.Bitwise > & | // 37 & 67 | 83 > Type: expression Hardness: 20 // Precedence & and ^ # 127 Bitwise.&.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > ^ & // 26 ^ 80 & 45 > Type: expression Hardness: 20 # 128 Bitwise.&.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > & ^ // 88 & 45 ^ 35 > Type: expression Hardness: 20 // Precedence & and ~ # 129 Bitwise.&.Precedence.Bitwise ? Bitwise.~.Precedence.Bitwise > ~ & // ~ 53 & 87 > Type: expression Hardness: 20 # 130 Bitwise.&.Precedence.Bitwise ? Bitwise.~.Precedence.Bitwise > & ~ // 73 & ~80 > Type: expression Hardness: 20 // Precedence & and << # 131 Bitwise.&.Precedence.Bitwise ? Bitwise.<<.Precedence.Bitwise > & << // 45 & 11 << 2 > Type: expression Hardness: 20 # 132 Bitwise.&.Precedence.Bitwise ? Bitwise.<<.Precedence.Bitwise > << & // 9 << 3 & 43 > Type: expression Hardness: 20 // Precedence & and >> # 133 Bitwise.&.Precedence.Bitwise ? Bitwise.>>.Precedence.Bitwise > & >> // 45 & 25 >> 2 > Type: expression Hardness: 20 # 134 Bitwise.&.Precedence.Bitwise ? Bitwise.>>.Precedence.Bitwise > >> & // 31 >> 2 & 43 > Type: expression Hardness: 20 // // COMMENTED OUT SINCE >>> APPLIES ONLY TO JAVA // // Precedence & and >>> // # 135 // Bitwise.{&.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // & >>> // // 45 & 25 >>> 2 // > // Type: expression // Hardness: 20 // // # 136 // Bitwise.{&.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // >>> & // // 31 >>> 2 & 43 // > // Type: expression // Hardness: 20 // Pretest problem // Precedence & and 2 other bitwise operators with positive operands // Precedence & , |, and ^ # 140 Bitwise.&.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,^.Precedence.Bitwise} > ^ | & // 70 ^ 94 | 39 & 55 > Type: expression Hardness: 25 // Precedence & , ^, and ~ # 141 Bitwise.&.Precedence.Bitwise ? Bitwise.{^.Precedence.Bitwise,~.Precedence.Bitwise} > ~ ^ & // ~ 94 ^ 39 & 55 > Type: expression Hardness: 25 // Precedence & , |, and << # 142 Bitwise.&.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,<<.Precedence.Bitwise} > | & << // 70 | 94 & 9 << 3 > Type: expression Hardness: 25 // Precedence & , ^, and >> # 143 Bitwise.&.Precedence.Bitwise ? Bitwise.{^.Precedence.Bitwise,>>.Precedence.Bitwise} > // >> & ^ // 70 >> 2 & 94 ^ 55 ^ & >> // 55 ^ 94 & 70 >> 2 > Type: expression Hardness: 25 // Precedence & , ~, and >> # 144 Bitwise.&.Precedence.Bitwise ? Bitwise.{~.Precedence.Bitwise,>>.Precedence.Bitwise} > & ~ >> // 55 & ~94 >> 2 > Type: expression Hardness: 25 // Posttest problem // Precedence & , |, and ^ # 145 Bitwise.&.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,^.Precedence.Bitwise} > | ^ & // 70 | -94 ^ 39 & 55 > Type: expression Hardness: 25 // // Precedence & , |, and >>> // # 144 // Bitwise.{&.Precedence.Bitwise,|.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // | >>> & // // 70 | 94 >>> 2 & 55 // > // Type: expression // Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.&.Precedence.Other - 150 // Precedence with respect to arithmetic operators // Precedence & with + or - # 150 Bitwise.&.Precedence.Other > // & + [] & + // 35 & 41 + 30 > Type: expression Hardness: 20 # 151 Bitwise.&.Precedence.Other > // - & [] - & // 59 - 29 & 21 > Type: expression Hardness: 20 # 152 Bitwise.&.Precedence.Other > // & - [] & - // 61 & 59 - 35 > Type: expression Hardness: 20 # 153 Bitwise.&.Precedence.Other > // + & [] + & // 31 + 27 & 39 > Type: expression Hardness: 20 // Precedence & with one of * or / or % # 154 Bitwise.&.Precedence.Other > * & // 3 * 8 & 31 > Type: expression Hardness: 20 # 155 Bitwise.&.Precedence.Other > // & / [,] & / // 43 & 45 / 5 > Type: expression Hardness: 20 # 156 Bitwise.&.Precedence.Other > % & // 47 % 4 & 53 > Type: expression Hardness: 20 # 157 Bitwise.&.Precedence.Other > & * // 51 & 7 * 3 > Type: expression Hardness: 20 # 158 Bitwise.&.Precedence.Other > // / & [,] / & // 72 / 5 & 35 > Type: expression Hardness: 20 # 159 Bitwise.&.Precedence.Other > & % // 85 & 59 % 6 > Type: expression Hardness: 20 // -------------------------------------------------------------------------- // Bitwise.&.Associativity - 175 // Three operands # 175 Bitwise.&.Associativity > & & // 40 & 60 & 90 > Type: expression Hardness: 20 // one operand is negative # 176 Bitwise.&.Associativity > & & // 46 & -45 & 68 > Type: expression Hardness: 20 // one operand is negative # 177 Bitwise.&.Associativity > & & // 66 & 33 & -47 > Type: expression Hardness: 20 // same operand twice # 178 Bitwise.&.Associativity > & & // 32 & 73 & 32 > Type: expression Hardness: 20 // one operand is 0 # 179 Bitwise.&.Associativity > & & 0 // 82 & 23 & 0 > Type: expression Hardness: 20 // Four operands # 180 Bitwise.&.Associativity > & & & // 25 & 51 & -27 & 76 > Type: expression Hardness: 25 // Two operands repeated # 181 Bitwise.&.Associativity > & & & // 50 & 75 & 50 & 75 > Type: expression Hardness: 25 // One operand is negative and repeated # 182 Bitwise.&.Associativity > & & & // 50 & -51 & 75 & -51 > Type: expression Hardness: 25 # 183 Bitwise.&.Associativity > & & & // -50 & 45 & -50 & 70 > Type: expression Hardness: 25 // Pretest problem # 184 Bitwise.&.Associativity > & & * // -50 & 45 & 6 * 5 > Type: expression Hardness: 25 // Posttest problem # 185 Bitwise.&.Associativity > [,] & / & // 50 & 72 / 9 & -45 > Type: expression Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.| - Total 56 templates // Bitwise.|.Correct - 200 // Bitwise.|.Precedence.Bitwise - 225 // Bitwise.|.Precedence.Other - 250 // Bitwise.|.Associativity - 275 // Both operands nonnegative // small | large # 200 Bitwise.|.Correct > | // 42 | 78 > Type: expression Hardness: 10 // large | small # 201 Bitwise.|.Correct > | // 85 | 38 > Type: expression Hardness: 10 // same operand twice # 202 Bitwise.|.Correct > | // 56 | 56 > Type: expression Hardness: 10 // one operand is all 0s # 203 Bitwise.|.Correct > | 0 // 71 | 0 > Type: expression Hardness: 10 // one operand is all 1s # 204 Bitwise.|.Correct > 255 | // 255 | 47 > Type: expression Hardness: 10 // One or more operands negative // positive | negative # 210 Bitwise.|.Correct > | // 73 | -58 > Type: expression Hardness: 15 // negative | positive # 211 Bitwise.|.Correct > | // -58 | 45 > Type: expression Hardness: 15 // negative | negative # 212 Bitwise.|.Correct > | // 39 | // -80 | -40 > Type: expression Hardness: 15 // same operand # 213 Bitwise.|.Correct > | // -57 | -57 > Type: expression Hardness: 15 // same operand positive | negative # 214 Bitwise.|.Correct > | // -66 | 66 > Type: expression Hardness: 15 // negative | 0 # 215 Bitwise.|.Correct > | 0 // -77 | 0 > Type: expression Hardness: 15 // -1 | negative # 216 Bitwise.|.Correct > -1 | // -1 | -66 > Type: expression Hardness: 15 // -------------------------------------------------------------------------- // Bitwise.|.Precedence.Bitwise - 225 // Precedence with respect to other bitwise operators // Precedence | and & # 225 Bitwise.|.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > | & // 74 | 36 & 42 > Type: expression Hardness: 20 # 226 Bitwise.|.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > & | // 37 & 67 | 83 > Type: expression Hardness: 20 // Precedence | and ^ # 227 Bitwise.|.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > ^ | // 26 ^ 80 | 45 > Type: expression Hardness: 20 # 228 Bitwise.|.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > | ^ // 88 | 45 ^ 35 > Type: expression Hardness: 20 // Precedence | and ~ with constants and variables # 229 Bitwise.|.Precedence.Bitwise ? Bitwise.~.Precedence.Bitwise > ~ | // ~ 53 | 87 > Type: expression Hardness: 20 # 230 Bitwise.|.Precedence.Bitwise ? Bitwise.~.Precedence.Bitwise > | ~ // 73 | ~80 > Type: expression Hardness: 20 // Precedence | and << # 231 Bitwise.|.Precedence.Bitwise ? Bitwise.<<.Precedence.Bitwise > | << // 45 | 10 << 2 > Type: expression Hardness: 20 # 232 Bitwise.|.Precedence.Bitwise ? Bitwise.<<.Precedence.Bitwise > << | // 11 << 2 | 43 > Type: expression Hardness: 20 // Precedence | and >> # 233 Bitwise.|.Precedence.Bitwise ? Bitwise.>>.Precedence.Bitwise > | >> // 45 | 25 >> 2 > Type: expression Hardness: 20 # 234 Bitwise.|.Precedence.Bitwise ? Bitwise.>>.Precedence.Bitwise > >> | // 31 >> 2 | 43 > Type: expression Hardness: 20 // // Precedence | and >>> // # 235 // Bitwise.{|.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // | >>> // // 45 | 25 >>> 2 // > // Type: expression // Hardness: 20 // // # 236 // Bitwise.{|.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // >>> | // // 31 >>> 2 | 43 // > // Type: expression // Hardness: 20 // Precedence | and 2 other bitwise operators with positive operands // Precedence | , &, and ^ # 240 Bitwise.|.Precedence.Bitwise ? Bitwise.{&.Precedence.Bitwise,^.Precedence.Bitwise} > | ^ & // 70 | 94 ^ 39 & 55 > Type: expression Hardness: 25 // Precedence | , ^, and ~ # 241 Bitwise.|.Precedence.Bitwise ? Bitwise.{^.Precedence.Bitwise,~.Precedence.Bitwise} > ^ ~ | // 94 ^ ~ 39 | 55 > Type: expression Hardness: 25 // Precedence |, &, and << # 242 Bitwise.&.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,<<.Precedence.Bitwise} > & << | // 94 & 8 << 2 | 77 > Type: expression Hardness: 25 // Precedence | , ^, and >> # 243 Bitwise.&.Precedence.Bitwise ? Bitwise.{^.Precedence.Bitwise,>>.Precedence.Bitwise} > | ^ >> // 70 | 94 ^ 55 >> 1 > Type: expression Hardness: 25 // // Precedence | , &, and >>> // # 244 // Bitwise.{|.Precedence.Bitwise,&.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // >>> | & // // 94 >>> 2 | 75 & 56 // > // Type: expression // Hardness: 25 // Pretest problem # 244 Bitwise.|.Precedence.Bitwise ? Bitwise.{~.Precedence.Bitwise,|.Precedence.Other} > | - ~ // 73 | 45 - ~ 35 > Type: expression Hardness: 25 // Pretest problem # 245 Bitwise.|.Precedence.Bitwise ? Bitwise.{~.Precedence.Bitwise,|.Precedence.Other} > | ~ + // 73 | ~ 35 + 65 > Type: expression Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.|.Precedence.Other - 250 // Precedence with respect to arithmetic operators // Precedence | with + or - # 250 Bitwise.|.Precedence.Other > // | - [] | - // 71 | 88 - 30 > Type: expression Hardness: 20 # 251 Bitwise.|.Precedence.Other > // + | [] + | // 35 + 40 | 29 > Type: expression Hardness: 20 # 252 Bitwise.|.Precedence.Other > // | + [] | + // 51 | 21 + 40 > Type: expression Hardness: 20 # 253 Bitwise.|.Precedence.Other > // - | [] - | // 78 - 44 | 70 > Type: expression Hardness: 20 // Precedence | with one of * or / or % # 254 Bitwise.|.Precedence.Other > | * // 51 | 7 * 3 > Type: expression Hardness: 20 # 255 Bitwise.|.Precedence.Other > // / | [,] / | // 85 / 5 | 35 > Type: expression Hardness: 20 # 256 Bitwise.|.Precedence.Other > | % // 85 | 59 % 6 > Type: expression Hardness: 20 # 257 Bitwise.|.Precedence.Other > * | // 3 * 8 | 31 > Type: expression Hardness: 20 # 258 Bitwise.|.Precedence.Other > // | / [,] | / // 43 | 75 / 5 > Type: expression Hardness: 20 # 259 Bitwise.|.Precedence.Other > % | // 47 % 4 | 53 > Type: expression Hardness: 20 // -------------------------------------------------------------------------- // Bitwise.|.Associativity - 275 // Three operands # 275 Bitwise.|.Associativity > | | // 40 | 60 | 90 > Type: expression Hardness: 20 // one operand is negative # 276 Bitwise.|.Associativity > | | // 46 | -45 | 68 > Type: expression Hardness: 20 # 277 Bitwise.|.Associativity > | | // 66 | 33 | -47 > Type: expression Hardness: 20 // same operand twice # 278 Bitwise.|.Associativity > | | // 32 | 73 | 32 > Type: expression Hardness: 20 // one operand is 0 # 279 Bitwise.|.Associativity > | | 0 // 82 | 23 | 0 > Type: expression Hardness: 20 // Four operands # 280 Bitwise.|.Associativity > | | | // 25 | 51 | -27 | 76 > Type: expression Hardness: 25 // Two operands repeated # 281 Bitwise.|.Associativity > | | | // 50 | 75 | 50 | 75 > Type: expression Hardness: 25 // One operand is negative and repeated # 282 Bitwise.|.Associativity > | | | // 50 | -51 | 75 | -51 > Type: expression Hardness: 25 # 283 Bitwise.|.Associativity > | | | // -50 | 45 | -50 | 70 > Type: expression Hardness: 25 // Pretest problem # 284 Bitwise.|.Associativity > | | << // 25 | -51 | 12 << 3 > Type: expression Hardness: 25 // Posttest problem # 285 Bitwise.|.Associativity > | << | // -25 | 12 << 3 | 51 > Type: expression Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.^ - Total 56 templates // Bitwise.^.Correct - 300 // Bitwise.^.Precedence.Bitwise - 325 // Bitwise.^.Precedence.Other - 350 // Bitwise.^.Associativity - 375 // Both operands nonnegative // small ^ large # 300 Bitwise.^.Correct > ^ // 42 ^ 78 > Type: expression Hardness: 10 // large ^ small # 301 Bitwise.^.Correct > ^ // 85 ^ 38 > Type: expression Hardness: 10 // same operand twice # 302 Bitwise.^.Correct > ^ // 56 ^ 56 > Type: expression Hardness: 10 // one operand is all 0s # 303 Bitwise.^.Correct > 0 ^ // 0 ^ 71 > Type: expression Hardness: 10 // one operand has all 1s in the right 7 digits # 304 Bitwise.^.Correct > ^ 127 // 53 ^ 127 > Type: expression Hardness: 10 // One or more operand negative // positive ^ negative # 310 Bitwise.^.Correct > ^ // 73 ^ -73 > Type: expression Hardness: 15 // negative ^ positive # 311 Bitwise.^.Correct > ^ // -58 ^ 45 > Type: expression Hardness: 15 // negative ^ negative # 312 Bitwise.^.Correct > ^ // -80 ^ -40 > Type: expression Hardness: 15 // same operand # 313 Bitwise.^.Correct > ^ // -57 ^ -57 > Type: expression Hardness: 15 // same operand positive ^ negative # 314 Bitwise.^.Correct > ^ // -66 ^ 66 > Type: expression Hardness: 15 // negative ^ 0 # 315 Bitwise.^.Correct > ^ 0 // -77 ^ 0 > Type: expression Hardness: 15 // -1 ^ negative # 316 Bitwise.^.Correct > -1 ^ // -1 ^ -66 > Type: expression Hardness: 15 // -------------------------------------------------------------------------- // Bitwise.^.Precedence.Bitwise - 325 // Precedence with respect to other bitwise operators // Precedence ^ and & # 325 Bitwise.^.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > ^ & // 37 ^ 67 & 83 > Type: expression Hardness: 20 # 326 Bitwise.^.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > & ^ // 74 & 36 ^ 42 > Type: expression Hardness: 20 // Precedence ^ and | # 327 Bitwise.^.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > | ^ // 26 | 80 ^ 45 > Type: expression Hardness: 20 # 328 Bitwise.^.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > ^ | // 88 ^ 45 | 35 > Type: expression Hardness: 20 // Precedence ^ and ~ # 329 Bitwise.^.Precedence.Bitwise ? Bitwise.~.Precedence.Bitwise > ~ ^ // ~ 53 ^ 87 > Type: expression Hardness: 20 # 330 Bitwise.^.Precedence.Bitwise ? Bitwise.~.Precedence.Bitwise > ^ ~ // 73 ^ ~80 > Type: expression Hardness: 20 // Precedence ^ and << # 331 Bitwise.^.Precedence.Bitwise ? Bitwise.<<.Precedence.Bitwise > ^ << // 45 ^ 11 << 2 > Type: expression Hardness: 20 # 332 Bitwise.^.Precedence.Bitwise ? Bitwise.<<.Precedence.Bitwise > << ^ // 9 << 3 ^ 43 > Type: expression Hardness: 20 // Precedence ^ and >> # 333 Bitwise.^.Precedence.Bitwise ? Bitwise.>>.Precedence.Bitwise > ^ >> // 45 ^ 25 >> 2 > Type: expression Hardness: 20 # 334 Bitwise.^.Precedence.Bitwise ? Bitwise.>>.Precedence.Bitwise > >> ^ // 31 >> 2 ^ 43 > Type: expression Hardness: 20 // // Precedence ^ and >>> // # 335 // Bitwise.{^.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // ^ >>> // // 45 ^ 25 >>> 2 // > // Type: expression // Hardness: 20 // // # 336 // Bitwise.{^.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // >>> ^ // // 31 >>> 2 ^ 43 // > // Type: expression // Hardness: 20 // Precedence ^ and 2 other bitwise operators with positive operands // Precedence ^ , &, and | # 340 Bitwise.^.Precedence.Bitwise ? Bitwise.{&.Precedence.Bitwise,|.Precedence.Bitwise} > ^ & | // 70 ^ 94 & 39 | 55 > Type: expression Hardness: 25 // Precedence ^ , |, and ~ # 341 Bitwise.^.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,~.Precedence.Bitwise} > ~ | ^ // ~ 94 | 39 ^ 55 > Type: expression Hardness: 25 // Precedence ^ , &, and << # 342 Bitwise.^.Precedence.Bitwise ? Bitwise.{&.Precedence.Bitwise,<<.Precedence.Bitwise} > ^ & << // 70 ^ 94 & 9 << 3 > Type: expression Hardness: 25 // Precedence ^ , |, and >> # 343 Bitwise.^.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,>>.Precedence.Bitwise} > ^ >> | // 61 ^ 70 >> 2 | 55 > Type: expression Hardness: 25 // Pretest problem // Precedence | , ^, and ~ # 344 Bitwise.^.Precedence.Bitwise ? Bitwise.{~.Precedence.Bitwise,^.Precedence.Other} > ^ + ~ // 94 ^ 58 + ~ 41 > Type: expression Hardness: 25 // Posttest problem // Precedence | , ^, and ~ # 345 Bitwise.^.Precedence.Bitwise ? Bitwise.{~.Precedence.Bitwise,^.Precedence.Other} > ^ ~ - // 94 ^ ~ 58 - -41 > Type: expression Hardness: 25 // // Precedence ^ , &, and >>> // # 344 // Bitwise.{^.Precedence.Bitwise,&.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // & >>> ^ // // 70 & 94 >>> 2 ^ 55 // > // Type: expression // Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.^.Precedence.Other - 350 // Precedence with respect to arithmetic operators // Precedence ^ with + or - # 350 Bitwise.^.Precedence.Other > // ^ + [] ^ + // 35 ^ 40 + 29 > Type: expression Hardness: 20 # 351 Bitwise.^.Precedence.Other > // - ^ [] - ^ // 59 - 20 ^ 21 > Type: expression Hardness: 20 # 352 Bitwise.^.Precedence.Other > // + ^ [] + ^ // 31 + 20 ^ 39 > Type: expression Hardness: 20 # 353 Bitwise.^.Precedence.Other > // ^ - [] ^ - // 61 ^ 59 - 30 > Type: expression Hardness: 20 // Precedence ^ with one of * or / or % # 354 Bitwise.^.Precedence.Other > * ^ // 3 * 8 ^ 31 > Type: expression Hardness: 20 # 355 Bitwise.^.Precedence.Other > // ^ / [,] ^ / // 43 ^ 77 / 5 > Type: expression Hardness: 20 # 356 Bitwise.^.Precedence.Other > % ^ // 47 % 4 ^ 53 > Type: expression Hardness: 20 # 357 Bitwise.^.Precedence.Other > ^ * // 51 ^ 7 * 3 > Type: expression Hardness: 20 # 358 Bitwise.^.Precedence.Other > // / ^ [,] / ^ // 65 / 5 ^ 35 > Type: expression Hardness: 20 # 359 Bitwise.^.Precedence.Other > ^ % // 85 ^ 59 % 6 > Type: expression Hardness: 20 // -------------------------------------------------------------------------- // Bitwise.^.Associativity - 375 // Three operands # 375 Bitwise.^.Associativity > ^ ^ // 40 ^ 60 ^ 90 > Type: expression Hardness: 20 // one operand is negative # 376 Bitwise.^.Associativity > ^ ^ // 46 ^ -45 ^ 68 > Type: expression Hardness: 20 # 377 Bitwise.^.Associativity > ^ ^ // 66 ^ 33 ^ -47 > Type: expression Hardness: 20 // same operand twice # 378 Bitwise.^.Associativity > ^ ^ // 32 ^ 73 ^ 32 > Type: expression Hardness: 20 // one operand is 0 # 379 Bitwise.^.Associativity > ^ ^ 0 // 82 ^ 23 ^ 0 > Type: expression Hardness: 20 // one operand is 127 - all 1s in right 7 digits # 380 Bitwise.^.Associativity > ^ ^ 127 // 82 ^ 23 ^ 127 > Type: expression Hardness: 20 // Four operands # 381 Bitwise.^.Associativity > ^ ^ ^ // 25 ^ 51 ^ -27 ^ 76 > Type: expression Hardness: 25 // Two operands repeated # 382 Bitwise.^.Associativity > ^ ^ ^ // 50 ^ 75 ^ 50 ^ 75 > Type: expression Hardness: 25 // One operand is negative and repeated # 383 Bitwise.^.Associativity > ^ ^ ^ // 50 ^ -51 ^ 75 ^ -51 > Type: expression Hardness: 25 # 384 Bitwise.^.Associativity > ^ ^ ^ // -50 ^ 45 ^ -50 ^ 70 > Type: expression Hardness: 25 // Pretest problem # 385 Bitwise.^.Associativity > ^ ^ >> // 50 ^ 45 ^ 54 >> 2 > Type: expression Hardness: 25 // Posttest problem # 386 Bitwise.^.Associativity > ^ >> ^ // 50 ^ 54 >> 2 ^ 45 > Type: expression Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.~ - Total 30 templates // Bitwise.~.Correct - 400 // Bitwise.~.Precedence.Bitwise - 425 // Bitwise.~.Precedence.Other - 450 // Bitwise.~.Associativity - 475 // Bitwise.~.Correct // Operand is non-negative // Small operand # 400 Bitwise.~.Correct > ~ // ~ 34 > Type: expression Hardness: 10 // Large operand # 401 Bitwise.~.Correct > ~ // ~ 71 > Type: expression Hardness: 10 // Operand all 0s # 402 Bitwise.~.Correct > ~0 > Type: expression Hardness: 10 //Operand negative # 403 Bitwise.~.Correct > ~ // - -81 > Type: expression Hardness: 10 // Operand all 1s # 404 Bitwise.~.Correct > ~ -1 > Type: expression Hardness: 10 // Operand all 1s except in sign bit # 405 Bitwise.~.Correct > ~ 127 > Type: expression Hardness: 10 // -------------------------------------------------------------------------- // 575-599 Bitwise.~.Precedence.Bitwise // Positive operands only // Precedence ~ and & // ~ positive & positive # 425 Bitwise.~.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > ~ & // ~ 59 & 74 > Type: expression Hardness: 20 // positive & ~ positive # 426 Bitwise.~.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > & ~ // 81 & ~ 65 > Type: expression Hardness: 15 // Precedence ~ and | // ~ positive | positive # 427 Bitwise.~.Precedence.Bitwise ? Bitwise.|.Precedence.Bitwise > ~ | // ~ 38 | 56 > Type: expression Hardness: 20 // positive | ~ positive # 428 Bitwise.~.Precedence.Bitwise ? Bitwise.|.Precedence.Bitwise > | ~ // 73 | ~ 90 > Type: expression Hardness: 15 // Precedence ~ and ^ // ~ positive ^ positive # 429 Bitwise.~.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > ~ ^ // ~ 41 ^ 83 > Type: expression Hardness: 20 // positive ^ ~ positive # 430 Bitwise.~.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > ^ ~ // 29 ^ ~ 74 > Type: expression Hardness: 15 // Precedence ~ and << // ~ small << small # 431 Bitwise.~.Precedence.Bitwise ? Bitwise.<<.Precedence.Bitwise > ~ << // ~ 5 << 2 > Type: expression Hardness: 20 // Precedence ~ and >> // ~ positive >> small # 432 Bitwise.~.Precedence.Bitwise ? Bitwise.>>.Precedence.Bitwise > ~ >> // ~ 35 >> 2 > Type: expression Hardness: 20 // // Precedence ~ and >>> // // ~ negative >>> small // # 433 // Bitwise.{~.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // ~ >>> // ~ -61 << 3 // > // Type: expression // Hardness: 20 // Precedence ~ and 2 other bitwise operators with positive operands // Precedence ~ , &, and | # 440 Bitwise.~.Precedence.Bitwise ? Bitwise.{&.Precedence.Bitwise,|.Precedence.Bitwise} > ~ | & // ~ 70 | 94 & 39 > Type: expression Hardness: 25 // Precedence ~ , &, and ^ # 441 Bitwise.~.Precedence.Bitwise ? Bitwise.{&.Precedence.Bitwise,^.Precedence.Bitwise} > & ~ ^ // 94 & ~ 39 ^ 55 > Type: expression Hardness: 25 // Precedence ~ , |, and << # 442 Bitwise.~.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,<<.Precedence.Bitwise} > ~ | << // ~ 70 | 9 << 3 > Type: expression Hardness: 25 // Pretest problem // Precedence ~ , &, and >> # 443 Bitwise.~.Precedence.Bitwise ? Bitwise.{&.Precedence.Bitwise,>>.Precedence.Bitwise} > & ~ >> // 94 & ~ 70 >> 2 > Type: expression Hardness: 25 // Posttest problem // Precedence & , ~, and >> # 444 Bitwise.~.Precedence.Bitwise ? Bitwise.{&.Precedence.Bitwise,>>.Precedence.Bitwise} > & >> ~ // 55 & -94 >> ~ -2 > Type: expression Hardness: 25 // // Precedence ~ , ^, and >>> // # 444 // Bitwise.{~.Precedence.Bitwise,^.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // >>> ^ ~ // // 70 >>> 2 ^ ~ 55 // > // Type: expression // Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.~.Precedence.Other - 450 // Precedence with respect to arithmetic operators // Precedence ~ with + # 450 Bitwise.&.Precedence.Other > // ~ + [] + ~ // 70 + ~ 35 > Type: expression Hardness: 20 // Precedence ~ with - # 451 Bitwise.~.Precedence.Other > // ~ - []~ - // ~ 39 - 20 > Type: expression Hardness: 20 // Precedence ~ with * # 452 Bitwise.~.Precedence.Other > * ~ // 5 * ~7 > Type: expression Hardness: 20 // Precedence ~ with / # 453 Bitwise.~.Precedence.Other > // ~ / []~ / // ~ 35 / 6 > Type: expression Hardness: 20 // Precedence ~ with % # 454 Bitwise.~.Precedence.Other > ~ % // ~ -47 % 6 > Type: expression Hardness: 20 # 455 Bitwise.&.Precedence.Other > []~ + // ~ 35 + 70 > Type: expression Hardness: 20 // Precedence ~ with - # 456 Bitwise.~.Precedence.Other > [] - ~ // 20 - ~ 39 > Type: expression Hardness: 20 // Precedence ~ with * # 457 Bitwise.~.Precedence.Other > * ~ // -5 * ~ -7 > Type: expression Hardness: 20 // Precedence ~ with / # 458 Bitwise.~.Precedence.Other > [] / ~ // 35 / ~6 > Type: expression Hardness: 20 // Precedence ~ with % # 459 Bitwise.~.Precedence.Other > % ~ // 47 % ~-6 > Type: expression Hardness: 20 // // Precedence ~ with ++ // # 460 // Bitwise.~.Precedence.Other // > // ~++ // // ~ -45 ++ // > // Type: expression // Hardness: 20 // Precedence of ~ with relational operators // In Java - return value of a relational expression is a boolean // In C++ - return value of a relational expression is an integer // Precedence ~ with > # 460 Bitwise.~.Precedence.Other > > ~ // -47 > ~ 53 > Type: expression Hardness: 20 // Precedence ~ with <= # 461 Bitwise.~.Precedence.Other > ~ <= // ~ 73 <= -48 > Type: expression Hardness: 20 // // Precedence ~ with < and && // # 462 // Bitwise.~.Precedence.Other // > // true && ~ < // // true && ~ -29 // > // Type: expression // Hardness: 20 // // // Precedence ~ with != and || // # 463 // Bitwise.~.Precedence.Other // > // ~ != || false // // ~ 85 != -59 || false // > // Type: expression // Hardness: 20 // ---------------------------------------------------- // Bitwise.~.Associativity 475 // Operand positive // Two ~s # 475 Bitwise.~.Associativity > ~~ // ~ ~ 44 > Type: expression Hardness: 15 // Two ~s, negative number # 476 Bitwise.~.Associativity > ~~ // ~ ~ - 71 > Type: expression Hardness: 15 # 480 Bitwise.~.Associativity ? Bitwise.{&.{Correct,Precedence.Bitwise},~.Precedence.Bitwise} > ~ & ~ // ~ 45 & ~ - 71 > Type: expression Hardness: 20 # 481 Bitwise.~.Associativity ? Bitwise.{|.{Correct,Precedence.Bitwise},~.Precedence.Bitwise} > ~ | ~ // ~ 71 | ~ - 45 > Type: expression Hardness: 20 # 482 Bitwise.~.Associativity ? Bitwise.{^.{Correct,Precedence.Bitwise},~.Precedence.Bitwise} > ~ ^ ~ // ~ 45 ^ ~ - 71 > Type: expression Hardness: 20 // Precedence with respect to arithmetic operators // Precedence ~ with + # 485 Bitwise.~.Associativity ? Bitwise.~.Precedence.Other > ~ + ~ // ~ -69 + ~ 35 > Type: expression Hardness: 20 // Precedence ~ with - # 486 Bitwise.~.Associativity ? Bitwise.~.Precedence.Other > ~ - ~ // ~ 39 - ~ 79 > Type: expression Hardness: 20 // Precedence ~ with * # 487 Bitwise.~.Associativity ? Bitwise.~.Precedence.Other > ~ * ~ // ~5 * ~7 > Type: expression Hardness: 20 // Precedence ~ with / # 488 Bitwise.~.Associativity ? Bitwise.~.Precedence.Other > []~ / ~ // ~ 35 / ~5 > Type: expression Hardness: 20 // Precedence ~ with % # 489 Bitwise.~.Associativity ? Bitwise.~.Precedence.Other > ~ % ~ // ~ -47 % ~ -6 > Type: expression Hardness: 20 // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- // Bitwise.<< - Total 38 templatesw // Bitwise.<<.Correct - 500 // Bitwise.<<.Precedence.Bitwise - 525 // Bitwise.<<.Precedence.Other - 550 // Bitwise.<<.Associativity - 575 //Correctness for << with positive left operand # 500 Bitwise.<<.Correct > << // 9 << 3 > Type: expression Hardness: 10 //Correctness - left operand positive, right operand zero # 501 Bitwise.<<.Correct > << 0 // 71 << 0 > Type: expression Hardness: 10 //Correctness for << with negative left operand # 502 Bitwise.<<.Correct > << //-8 << 2 > Type: expression Hardness: 10 //Correctness - left operand negative, right operand zero # 503 Bitwise.<<.Correct > << 0 // -49 << 0 > Type: expression Hardness: 10 // -------------------------------------------------------------------------- // Bitwise.<<.Precedence.Bitwise - 525 // Precedence with respect to other bitwise operators // Positive operands only // Precedence << and & # 525 Bitwise.<<.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > & << // 45 & 11 << 2 > Type: expression Hardness: 20 // Precedence << and & # 526 Bitwise.<<.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > << & // 9 << 3 & 63 > Type: expression Hardness: 20 // Precedence << and | # 527 Bitwise.<<.Precedence.Bitwise ? Bitwise.|.Precedence.Bitwise > | << // 45 | 11 << 2 > Type: expression Hardness: 20 // Precedence << and | # 528 Bitwise.<<.Precedence.Bitwise ? Bitwise.|.Precedence.Bitwise > << | // 9 << 3 | 63 > Type: expression Hardness: 20 // Precedence << and ^ # 529 Bitwise.<<.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > ^ << // 45 ^ 11 << 2 > Type: expression Hardness: 20 // Precedence << and ^ # 530 Bitwise.<<.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > << ^ // 9 << 3 ^ 63 > Type: expression Hardness: 20 // Precedence << and ~ # 531 Bitwise.<<.Precedence.Bitwise ? Bitwise.~.Precedence.Bitwise > ~ << // ~ 11 << 2 > Type: expression Hardness: 20 // // Precedence << and >>> // # 534 // Bitwise.<<.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // << >>> // // 9 << 3 >>> 2 // > // Type: expression // Hardness: 20 // // // Precedence << and >>> // # 535 // Bitwise.{<<.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // >>> << // // 45 >>> 3 << 2 // > // Type: expression // Hardness: 20 // Precedence << and 2 other bitwise operators with positive operands // Precedence << , |, and ^ # 540 Bitwise.<<.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,^.Precedence.Bitwise} > << | ^ // 7 << 3 | 39 ^ 55 > Type: expression Hardness: 25 // Precedence << , ^, and ~ # 541 Bitwise.<<.Precedence.Bitwise ? Bitwise.{^.Precedence.Bitwise,~.Precedence.Bitwise} > ~ ^ << // ~ 94 ^ 4 << 2 > Type: expression Hardness: 25 // Precedence << , |, and & # 542 Bitwise.<<.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,&.Precedence.Bitwise} > | << & // 70 | 9 << 1 & 73 > Type: expression Hardness: 25 // Precedence << , ^, and >> # 543 Bitwise.<<.Precedence.Bitwise ? Bitwise.{^.Precedence.Bitwise,>>.Precedence.Bitwise} > ^ >> << // 55 ^ 70 >> 3 << 2 > Type: expression Hardness: 25 // // Precedence << , |, and >>> // # 544 // Bitwise.{<<.Precedence.Bitwise,|.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // >>> | << // // 70 >>> 2 | 7 << 3 // > // Type: expression // Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.<<.Precedence.Other - 550 // Precedence with respect to arithmetic operators // Precedence << with + # 550 Bitwise.<<.Precedence.Other > + << // 3 + 5 << 2 > Type: expression Hardness: 20 // Precedence << with - # 551 Bitwise.<<.Precedence.Other > // << - [,] << - // 7 << 5 - 3 > Type: expression Hardness: 20 // // Precedence << with post ++ // # 552 // Bitwise.<<.Precedence.Other // > // << ++ // // 5 << 2 ++ // > // Type: expression // Hardness: 20 // // // Precedence << with pre -- // # 553 // Bitwise.<<.Precedence.Other // > // -- << // // -- 6 << 2 // > // Type: expression // Hardness: 20 // Precedence << with * # 552 Bitwise.<<.Precedence.Other > // * << [,,] * << // 3 * 4 << 2 > Type: expression Hardness: 20 // Precedence << with / # 553 Bitwise.<<.Precedence.Other > // << / [,] << / // 9 << 5 / 2 > Type: expression Hardness: 20 // Precedence << with % # 554 Bitwise.<<.Precedence.Other > // % << [,] % << // 61 % 9 << 3 > Type: expression Hardness: 20 // Precedence of << with relational operators // In Java - return value of a relational expression is a boolean // In C++ - return value of a relational expression is an integer // Precedence << with > # 560 Bitwise.<<.Precedence.Other > << > // 9 << 2 > 57 > Type: expression Hardness: 20 // Precedence << with <= # 561 Bitwise.<<.Precedence.Other > <= << // 62 <= 9 << 2 > Type: expression Hardness: 20 // Precedence << with == and && # 562 Bitwise.<<.Precedence.Other > == << // 59 == 7 << 2 > Type: expression Hardness: 25 / Precedence << with < and || # 563 Bitwise.<<.Precedence.Other > << < // 8 << 2 < 66 > Type: expression Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.<<.Associativity - 575 // Three operands, the right two operands are positive // Left operand is positive # 575 Bitwise.<<.Associativity > << << // 5 << 2 << 1 > Type: expression Hardness: 20 // Left operand is negative # 576 Bitwise.<<.Associativity > << << // -4 << 1 << 2 > Type: expression Hardness: 20 // Right operand is 0, left operand is positive # 577 Bitwise.<<.Associativity > << << 0 // 7 << 2 << 0 > Type: expression Hardness: 20 // Precedence << and >> # 578 Bitwise.<<.Associativity ? Bitwise.>>.Associativity > << >> // 9 << 3 >> 2 > Type: expression Hardness: 20 // Precedence << and >> # 579 Bitwise.<<.Associativity ? Bitwise.>>.Associativity > >> << // 45 >> 3 << 2 > Type: expression Hardness: 20 // Four operands # 580 Bitwise.<<.Associativity > << << << 1 // 3 << 1 << 2 << 1 > Type: expression Hardness: 25 // Pretest problem // Precedence << and >> # 581 Bitwise.<<.Associativity ? Bitwise.{>>.Associativity,<<.Precedence.Other,>>.Precedence.Other} > [] >> - << // 45 >> 9 - 6 << 2 > Type: expression Hardness: 25 // Posttest problem // Precedence << and >> # 582 Bitwise.<<.Associativity ? Bitwise.{>>.Associativity,<<.Precedence.Other,>>.Precedence.Other} > [] >> << - // 45 >> 3 << 9 - 6 > Type: expression Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.>> - Total 38 templates // Bitwise.>>.Positive.Correct - 600 // Bitwise.>>.Negative.Correct - 625 // Bitwise.>>.Precedence.Bitwise - 650 // Bitwise.>>.Precedence.Other - 675 // Bitwise.>>.Associativity - 700 //Correctness for >> with positive left operand # 600 Bitwise.>>.Positive.Correct > >> // 71 >> 3 > Type: expression Hardness: 10 //Correctness - left operand negative, right operand zero # 601 Bitwise.>>.Positive.Correct > >> 0 // 79 >> 0 > Type: expression Hardness: 10 // -------------------------------------------------------------------------- //Correctness for >> with negative left operand # 625 Bitwise.>>.Negative.Correct > >> //-63 >> 2 > Type: expression Hardness: 10 //Correctness - left operand negative, right operand zero # 626 Bitwise.>>.Negative.Correct > >> 0 // -53 >> 0 > Type: expression Hardness: 10 // -------------------------------------------------------------------------- // Bitwise.>>.Precedence.Bitwise - 650 // Precedence with respect to other bitwise operators // Positive operands only // Precedence >> and & # 650 Bitwise.>>.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > & >> // 45 & 67 >> 2 > Type: expression Hardness: 20 // Precedence >> and & # 651 Bitwise.>>.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > >> & // 71 >> 3 & 63 > Type: expression Hardness: 20 // Precedence >> and | # 652 Bitwise.>>.Precedence.Bitwise ? Bitwise.|.Precedence.Bitwise > | >> // 45 | 53 >> 2 > Type: expression Hardness: 20 // Precedence >> and | # 653 Bitwise.>>.Precedence.Bitwise ? Bitwise.|.Precedence.Bitwise > >> | // 49 >> 3 | 63 > Type: expression Hardness: 20 // Precedence >> and ^ # 654 Bitwise.>>.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > ^ >> // 45 ^ 91 >> 2 > Type: expression Hardness: 20 // Precedence >> and ^ # 655 Bitwise.>>.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > >> ^ // 77 >> 3 ^ 63 > Type: expression Hardness: 20 // Precedence >> and ~ # 656 Bitwise.>>.Precedence.Bitwise ? Bitwise.~.Precedence.Bitwise > ~ >> // ~ 72 >> 2 > Type: expression Hardness: 20 // Precedence >> and ~ # 657 Bitwise.>>.Precedence.Bitwise ? Bitwise.~.Precedence.Bitwise > ~ >> // ~ -72 >> 2 > Type: expression Hardness: 20 // // Precedence >> and >>> // # 659 // Bitwise.>>.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // >> >>> // // 69 >> 1 >>> 2 // > // Type: expression // Hardness: 20 // // // Precedence >> and >>> // # 660 // Bitwise.{>>.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // >>> >> // // 45 >>> 3 >> 2 // > // Type: expression // Hardness: 20 // Precedence >> and 2 other bitwise operators with positive operands // Precedence >> , &, and ^ # 665 Bitwise.>>.Precedence.Bitwise ? Bitwise.{&.Precedence.Bitwise,^.Precedence.Bitwise} > ^ >> & // 55 ^ 67 >> 3 & 39 > Type: expression Hardness: 25 // Precedence >> , |, and ~ # 666 Bitwise.>>.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,~.Precedence.Bitwise} > ~ | >> // ~ 94 | 84 >> 2 > Type: expression Hardness: 25 // Precedence >> , |, and ^ # 667 Bitwise.>>.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,^.Precedence.Bitwise} > | >> ^ // 70 | 59 >> 1 ^ 73 > Type: expression Hardness: 25 // Precedence >> , &, and << # 668 Bitwise.>>.Precedence.Bitwise ? Bitwise.{&.Precedence.Bitwise,<<.Associativity,>>.Associativity} > << >> & // 7 << 3 >> 2 & 55 > Type: expression Hardness: 25 // // Precedence >> , |, and >>> // # 669 // Bitwise.{>>.Precedence.Bitwise,|.Precedence.Bitwise,>>>.Precedence.Bitwise} // > // >>> | >> // // 70 >> 2 | 73 >>> 3 // > // Type: expression // Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.>>.Precedence.Other - 675 // Precedence with respect to arithmetic operators // Precedence >> with + # 675 Bitwise.>>.Precedence.Other > // + >> [] + >> // 33 + 20 >> 2 > Type: expression Hardness: 20 // Precedence >> with - # 676 Bitwise.>>.Precedence.Other > // >> - [] >> - // 71 >> 5 - 3 > Type: expression Hardness: 20 // // Precedence >> with post -- // # 677 // Bitwise.>>.Precedence.Other // > // >> -- // // 48 >> 3 -- // > // Type: expression // Hardness: 20 // // // Precedence >> with pre ++ // # 678 // Bitwise.>>.Precedence.Other // > // ++ >> // // ++ 81 >> 2 // > // Type: expression // Hardness: 20 // Precedence >> with * # 677 Bitwise.>>.Precedence.Other > * >> // 7 * 9 >> 2 > Type: expression Hardness: 20 // Precedence >> with / # 678 Bitwise.>>.Precedence.Other > // >> / [,] >> / // 59 >> 27 / 9 > Type: expression Hardness: 20 // Precedence >> with % # 679 Bitwise.>>.Precedence.Other > // >> % [,,] >> % // 61 >> 73 % 3 > Type: expression Hardness: 20 // Precedence of >> with relational operators // In Java - return value of a relational expression is a boolean // In C++ - return value of a relational expression is an integer // Precedence >> with < # 685 Bitwise.>>.Precedence.Other > >> < // 89 >> 2 < 57 > Type: expression Hardness: 20 // Precedence >> with >= # 686 Bitwise.>>.Precedence.Other > >= >> // 62 >= 49 >> 2 > Type: expression Hardness: 20 // Precedence >> with != and || # 687 Bitwise.>>.Precedence.Other > != >> || false // 39 != 87 >> 2 || false > Type: expression Hardness: 25 / Precedence >> with < and && # 688 Bitwise.>>.Precedence.Other > true && >> < // true && 78 >> 2 < 66 > Type: expression Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.>>.Associativity - 700 // Three operands, the right two operands are positive // Left operand is positive # 700 Bitwise.>>.Associativity > >> >> // 85 >> 2 >> 3 > Type: expression Hardness: 20 // Left operand is negative # 701 Bitwise.>>.Associativity > >> >> // -77 >> 2 >> 3 > Type: expression Hardness: 20 // Right operand is 0, left operand is positive # 702 Bitwise.>>.Associativity > >> >> 0 // 67 >> 2 >> 0 > Type: expression Hardness: 20 // Precedence >> and << # 705 Bitwise.>>.Associativity ? Bitwise.<<.Associativity > << >> // 9 << 3 >> 2 > Type: expression Hardness: 20 // Precedence >> and << # 706 Bitwise.>>.Associativity ? Bitwise.<<.Associativity > >> << // 45 >> 3 << 2 > Type: expression Hardness: 20 // Four operands, left operand is positive # 710 Bitwise.>>.Associativity > >> >> >> 1 // 73 >> 1 >> 2 >> 1 > Type: expression Hardness: 25 // Four operands, left operand is negative # 711 Bitwise.>>.Associativity > >> >> >> 1 // -73 >> 1 >> 2 >> 1 > Type: expression Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.Incorrect operand type for bitwise operator - 725 // One or two float operands - Error for Java, C++, and C# # 725 Bitwise.Incorrect operand type for bitwise operator > & // 42 & 78.6 > Type: expression Hardness: 10 # 726 Bitwise.Incorrect operand type for bitwise operator > | // 59.3 | 67 > Type: expression Hardness: 10 # 727 Bitwise.Incorrect operand type for bitwise operator > ^ // 41.8 ^ 87.3 > Type: expression Hardness: 10 // Left operand is a float # 728 Bitwise.Incorrect operand type for bitwise operator > << // 59.3 << 2 > Type: expression Hardness: 10 // A float operand for ~ - Error for Java, C++, and C# # 729 Bitwise.Incorrect operand type for bitwise operator > ~ // ~ 78.6 > Type: expression Hardness: 10 // Right operand is a float # 730 Bitwise.Incorrect operand type for bitwise operator > >> // 42 >> 3.5 > Type: expression Hardness: 10 # 731 Bitwise.Incorrect operand type for bitwise operator > & // 59.3 & 67 > Type: expression Hardness: 10 // Pretest problem # 732 Bitwise.Incorrect operand type for bitwise operator > | // 41.8 | 87.3 > Type: expression Hardness: 10 // One or two float operands - Error for Java, C++, and C# # 733 Bitwise.Incorrect operand type for bitwise operator > ^ // 42 ^ 78.6 > Type: expression Hardness: 10 // Right operand is a float # 734 Bitwise.Incorrect operand type for bitwise operator > << // 42 << 3.5 > Type: expression Hardness: 10 // A float operand for ~ - Error for Java, C++, and C# # 735 Bitwise.Incorrect operand type for bitwise operator > ~ // ~ -59.3 > Type: expression Hardness: 10 // Left operand is a float # 736 Bitwise.Incorrect operand type for bitwise operator > >> // 59.3 >> 2 > Type: expression Hardness: 10 // Posttest problem # 737 Bitwise.Incorrect operand type for bitwise operator > & // & // 41.8 & 87.3 > Type: expression Hardness: 10 // One or two float operands - Error for Java, C++, and C# # 738 Bitwise.Incorrect operand type for bitwise operator > | // 42 | 78.6 > Type: expression Hardness: 10 # 739 Bitwise.Incorrect operand type for bitwise operator > ^ // 59.3 ^ 67 > Type: expression Hardness: 10 // Both operands are floats # 740 Bitwise.Incorrect operand type for bitwise operator > << // 41.8 << 4.3 > Type: expression Hardness: 10 // Both operands are floats # 741 Bitwise.Incorrect operand type for bitwise operator > >> // 41.8 >> 4.3 > Type: expression Hardness: 10 // Pretest problem # 742 Bitwise.Incorrect operand type for bitwise operator > >> ~ ~ // 41.8 >> ~ ~ 3 > Type: expression Hardness: 15 // Posttest problem # 743 Bitwise.Incorrect operand type for bitwise operator > << ~ ~ // 41.8 << ~ ~ 3 > Type: expression Hardness: 15 // // & with a boolean operand or a relalational operator // // Creates an error in Java and C# // // Not an error in C++ because true is 1 and false is 0 // # 745 // Bitwise.&.Incorrect operand type for bitwise operator // > // & true // // 42 & true // > // Type: expression // Hardness: 10 // // # 745 // Bitwise.&.Incorrect operand type for bitwise operator // > // false & // // false & 67 // > // Type: expression // Hardness: 10 // // # 745 // Bitwise.&.Incorrect operand type for bitwise operator // > // true & false // > // Type: expression // Hardness: 10 // // # 745 // Bitwise.&.Incorrect operand type for bitwise operator // > // & > // // 61 & 77 > 49 // > // Type: expression // Hardness: 20 // // # 745 // Bitwise.&.Incorrect operand type for bitwise operator // > // != & // // 30 != 81 & 74 // > // Type: expression // Hardness: 20 // // | with a boolean operand or a relalational operator // // Creates an error in Java and C# // // Not an error in C++ because true is 1 and false is 0 // # 745 // Bitwise.|.Incorrect operand type for bitwise operator // > // | true // // 42 | true // > // Type: expression // Hardness: 10 // // # 745 // Bitwise.|.Incorrect operand type for bitwise operator // > // false | // // false | 67 // > // Type: expression // Hardness: 10 // // # 745 // Bitwise.|.Incorrect operand type for bitwise operator // > // true | false // > // Type: expression // Hardness: 10 // // # 745 // Bitwise.|.Incorrect operand type for bitwise operator // > // | <= // // 61 | 77 <= 49 // > // Type: expression // Hardness: 20 // // # 745 // Bitwise.|.Incorrect operand type for bitwise operator // > // == | // // 30 == 81 | 74 // > // Type: expression // Hardness: 20 // // ^ with a boolean operand or a relalational operator // // Creates an error in Java and C# // // Not an error in C++ because true is 1 and false is 0 // # 745 // Bitwise.^.Incorrect operand type for bitwise operator // > // ^ true // // 42 ^ true // > // Type: expression // Hardness: 10 // // # 745 // Bitwise.^.Incorrect operand type for bitwise operator // > // false ^ // // false ^ 67 // > // Type: expression // Hardness: 10 // // # 745 // Bitwise.^.Incorrect operand type for bitwise operator // > // true ^ false // > // Type: expression // Hardness: 10 // // # 745 // Bitwise.^.Incorrect operand type for bitwise operator // > // ^ > // // 61 ^ 77 > 49 // > // Type: expression // Hardness: 20 // // # 745 // Bitwise.^.Incorrect operand type for bitwise operator // > // != ^ // // 30 != 81 ^ 74 // > // Type: expression // Hardness: 20 // // A boolean operand for ~ - Error for Java and C# but not C++ // // Because true == 1 and false == 0 in C++ // # 745 // Bitwise.~.Incorrect operand type for bitwise operator // > // ~ true // > // Type: expression // Hardness: 10 // // NOTE - Unlike &, |, and ^, in a relational expression, the ~ operator does // not create an error in Java or C++ in a relalational operator because ~ // has higher precedence than the relational operators. // NOTE - Unlike &, |, and ^, in a relational expression, the << operator does // not create an error in Java or C++ in a relalational operator because << // has higher precedence than the relational operators. // NOTE - Unlike &, |, and ^, in a relational expression, the << operator does // not create an error in Java or C++ in a relalational operator because << // has higher precedence than the relational operators. // -------------------------------------------------------------------------- // Bitwise.>>>.Incorrect operand type for bitwise operator >>> - 1100 // One or two float operands - Error for Java, C++, and C# // // Left operand is a float // # 1100 // Bitwise.>>>.Incorrect operand type for bitwise operator // > // >>> // // 59.3 >>> 2 // > // Type: expression // Hardness: 10 // // // Right operand is a float // # 1101 // Bitwise.>>>.Incorrect operand type for bitwise operator // > // >>> // // 42 >>> 3.5 // > // Type: expression // Hardness: 10 // // // Both operands are floats // # 1102 // Bitwise.>>>.Incorrect operand type for bitwise operator // > // >>> // // 41.8 >>> 87.3 // > // Type: expression // Hardness: 10 // // NOTE - Unlike &, |, and ^, in a relational expression, the >>> operator does // not create an error in Java or C++ because >>> // has higher precedence than the relational operators. // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- // Bitwise.Parenthesis - 27 templates // Bitwise.Parenthesis.Precedence - 750 // Bitwise.Parenthesis.Associativity - 775 // Bitwise.Parenthesis.Precedence // Parentheses used to force early evaluation of operator with lower precedence // Operators & and | # 750 Bitwise.Parenthesis.Precedence > & ( | ) // 47 & (83 | 51) > Type: expression Hardness: 15 // Parentheses used to force early evaluation of operator with lower precedence // Operators & and ^ # 751 Bitwise.Parenthesis.Precedence > // ( ^ ) & & ( ^ ) // 51 & (47 ^ 83) > Type: expression Hardness: 15 // Parentheses used to force early evaluation of operator with lower precedence // Operators ~ and | # 752 Bitwise.Parenthesis.Precedence > ~( | ) // ~ (83 | 51) > Type: expression Hardness: 15 // Parentheses used to force early evaluation of operator with lower precedence // Operators << and ^ # 753 Bitwise.Parenthesis.Precedence > ( ^ ) << // (12 ^ 9) << 2 > Type: expression Hardness: 15 // Parentheses used to force early evaluation of operator with lower precedence // Operators >> and & # 754 Bitwise.Parenthesis.Precedence > // >> ( & 3) [] >> ( & 3) // 74 >> (7 & 3) > Type: expression Hardness: 15 // Parentheses used to force early evaluation of operator with lower precedence // Operators >> and | # 755 Bitwise.Parenthesis.Precedence > ( | ) >> // (63 | 51) >> 2 > Type: expression Hardness: 15 // Parentheses used to force early evaluation of operator with lower precedence // Bitwise operator & and relational operator >= # 756 Bitwise.Parenthesis.Precedence > ( & ) >= // (63 & 51) >= 75 > Type: expression Hardness: 15 // Parentheses used to force early evaluation of operator with lower precedence // Bitwise operator ^ and relational operator < # 757 Bitwise.Parenthesis.Precedence > < ( ^ ) // 63 < (51 ^ 75) > Type: expression Hardness: 15 // Parentheses used to force early evaluation of operators with lower precedence // Three operators &, |, and ^ # 758 Bitwise.Parenthesis.Precedence > | & ( ^ ) // 63 | 51 & (82 ^ 70) > Type: expression Hardness: 20 // Parentheses used to force early evaluation of operators with lower precedence // Three operators &, |, and ^ # 759 Bitwise.Parenthesis.Precedence > & ( | ) ^ // 63 & (51 | 82) ^ 70 > Type: expression Hardness: 20 // Parentheses partially determine order of evaluation of operators // Three operators &, |, and ^ # 760 Bitwise.Parenthesis.Precedence > & ^ ( | ) // 63 & 51 ^ (82 | 70) > Type: expression Hardness: 25 // Parentheses partially determine order of evaluation of operators // Three operators &, |, and ^ # 761 Bitwise.Parenthesis.Precedence > | ( ^ ) & // 63 | (51 ^ 82) & 70 > Type: expression Hardness: 25 // Parentheses partially determine order of evaluation of operators // Three operators |, ^, and << # 762 Bitwise.Parenthesis.Precedence > ^ ( | ) << // 63 ^ (9 | 11) << 2 > Type: expression Hardness: 25 // Parentheses partially determine order of evaluation of operators // Three operators &, |, and >> # 763 Bitwise.Parenthesis.Precedence > ( | ) & >> // (63 | 51) & 82 >> 2 > Type: expression Hardness: 25 // Parentheses partially determine order of evaluation of operators // Three operators &, ^, and >> # 764 Bitwise.Parenthesis.Precedence > & ( ^ >> ) // 63 & (51 ^ 82 >> 2) > Type: expression Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.Parenthesis.Associativity - 775 // Parentheses used to determine order of evaluation of three | operators # 775 Bitwise.Parenthesis.Associativity > ( | ) ^ ( | ) // (74 | 86) ^ (68 | 59) > Type: expression Hardness: 25 // Parentheses used to determine order of evaluation of three ^ operators # 776 Bitwise.Parenthesis.Associativity > & ( ^ ( | )) // 74 & (86 ^ (68 | 59)) > Type: expression Hardness: 25 // Pretest problem // Parentheses used to partially determine order of evaluation of three & operators # 777 Bitwise.Parenthesis.Associativity > ( | ) & ( ^ ) // (74 | 86) & (68 ^ 59) > Type: expression Hardness: 25 # 778 Bitwise.Parenthesis.Associativity > ( ^ ) & ( ^ ) // (74 ^ 86) & (68 ^ 59) > Type: expression Hardness: 25 // Parentheses used to determine order of evaluation of three ^ operators # 779 Bitwise.Parenthesis.Associativity > ( ^ ( | )) & // (74 ^ (86 | 68)) & 59 > Type: expression Hardness: 25 // Posttest problem // Parentheses used to partially determine order of evaluation of three & operators # 780 Bitwise.Parenthesis.Associativity > ( ^ ) & ( | ) // (74 ^ 86) & (68 | 59) > Type: expression Hardness: 25 // Parentheses used to partially determine order of evaluation of three | operators # 781 Bitwise.Parenthesis.Associativity > | ( | ( | )) // 74 | (86 | (68 | 59)) > Type: expression Hardness: 25 // Parentheses used to partially determine order of evaluation of three | operators # 782 Bitwise.Parenthesis.Associativity > ( & ( & )) & // (74 & (86 & 68)) & 59 > Type: expression Hardness: 25 // Parentheses used to partially determine order of evaluation of three | operators # 783 Bitwise.Parenthesis.Associativity > ^ ( ^ ( ^ )) // 74 ^ (86 ^ (68 ^ 59)) > Type: expression Hardness: 25 // Parentheses used to determine order of evaluation of &, |, ^, ~ operators # 785 Bitwise.Parenthesis.Associativity > ~( ^ ) & ~( ^ ) // ~(81 ^ 65) & ~(54 ^ 45) > Type: expression Hardness: 30 // Parentheses used to determine order of evaluation of &, |, ^, ~ operators # 786 Bitwise.Parenthesis.Associativity > ~( | ) ^ ~( | ) // ~(81 | 65) ^ ~(54 | 45) > Type: expression Hardness: 30 // Parentheses used to determine order of evaluation of &, |, ^, ~ operators # 787 Bitwise.Parenthesis.Associativity > ~( | ) & ~( | ) // ~(81 | 65) & ~(54 | 45) > Type: expression Hardness: 30 // Parentheses used to determine order of evaluation of &, |, ^, ~ operators # 788 Bitwise.Parenthesis.Associativity > ~( | ) ^ ~( ^ ) // ~(81 | 65) ^ ~(54 ^ 45) > Type: expression Hardness: 30 // Parentheses used to determine order of evaluation of &, |, ^, ~ operators # 789 Bitwise.Parenthesis.Associativity > ~( | ) & ~( ^ ) // ~(81 | 65) & ~(54 ^ 45) > Type: expression Hardness: 30 // Parentheses used to determine order of evaluation of &, |, ^, ~ operators # 790 Bitwise.Parenthesis.Associativity > ~( ^ ) & ~( | ) // ~(81 ^ 65) & ~(54 | 45) > Type: expression Hardness: 30 // -------------------------------------------------------------------------- // Bitwise.>>> - Total 38 templates // Bitwise.>>>.Correct - 800 // Bitwise.>>>.Precedence.Bitwise - 825 // Bitwise.>>>.Precedence.Other - 850 // Bitwise.>>>.Associativity - 875 // Correctness for >>> with positive left operand # 800 Bitwise.>>>.Correct > >>> // 49 >>> 3 > Type: expression Hardness: 10 // Correctness for >>> with negative left operand // Assumes 32 bit integer # 801 Bitwise.>>>.Correct > >>> //-8 >>> 32 > Type: expression Hardness: 10 //Correctness for >>> with right operand equal to zero # 802 Bitwise.>>>.Correct > >>> 0 // 39 >>> 0 > Type: expression Hardness: 10 // -------------------------------------------------------------------------- // Bitwise.>>>.Precedence.Bitwise - 825 // Precedence with respect to other bitwise operators // Positive operands only // Precedence >>> and & # 825 Bitwise.>>>.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > & >>> // 45 & 11 >>> 2 > Type: expression Hardness: 20 // Precedence >>> and & # 826 Bitwise.>>>.Precedence.Bitwise ? Bitwise.&.Precedence.Bitwise > >>> & // 9 >>> 3 & 63 > Type: expression Hardness: 20 // Precedence >>> and | # 827 Bitwise.>>>.Precedence.Bitwise ? Bitwise.|.Precedence.Bitwise > | >>> // 45 | 11 >>> 2 > Type: expression Hardness: 20 // Precedence >>> and | # 828 Bitwise.>>>.Precedence.Bitwise ? Bitwise.|.Precedence.Bitwise > >>> | // 9 >>> 3 | 63 > Type: expression Hardness: 20 // Precedence >>> and ^ # 829 Bitwise.>>>.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > ^ >>> // 45 ^ 11 >>> 2 > Type: expression Hardness: 20 // Precedence >>> and ^ # 830 Bitwise.>>>.Precedence.Bitwise ? Bitwise.^.Precedence.Bitwise > >>> ^ // 9 >>> 3 ^ 63 > Type: expression Hardness: 20 // Precedence >>> and ~ # 831 Bitwise.>>>.Precedence.Bitwise ? Bitwise.~.Precedence.Bitwise > ~ >>> // ~ -83 >>> 2 > Type: expression Hardness: 20 // Precedence >>> and ~ # 832 Bitwise.>>>.Precedence.Bitwise ? Bitwise.~.Precedence.Bitwise > ~ >>> // ~ 83 >>> 2 > Type: expression Hardness: 20 // Pretest problem for Java // Precedence >>> and 2 other bitwise operators with positive operands // Precedence >>> , &, and | # 840 Bitwise.>>>.Precedence.Bitwise ? Bitwise.{&.Precedence.Bitwise,|.Precedence.Bitwise} > | >>> & // 55 | 67 >>> 3 & 39 > Type: expression Hardness: 25 // Precedence >>> , ^, and ~ # 841 Bitwise.>>>.Precedence.Bitwise ? Bitwise.{^.Precedence.Bitwise,~.Precedence.Bitwise} > ~ ^ >>> // ~ 94 ^ 84 >>> 2 > Type: expression Hardness: 25 // Posttest problem for Java // Precedence >>> , &, and ^ # 842 Bitwise.>>>.Precedence.Bitwise ? Bitwise.{&.Precedence.Bitwise,^.Precedence.Bitwise} > & >>> ^ // 70 & 59 >>> 1 ^ 73 > Type: expression Hardness: 25 // Precedence >>> , |, and << # 843 Bitwise.>>>.Precedence.Bitwise ? Bitwise.{|.Precedence.Bitwise,<<.Associativity,>>>.Associativity} > << >>> | // 7 << 3 >>> 2 | 55 > Type: expression Hardness: 25 // Precedence >>> , ^, and >> # 844 Bitwise.>>>.Precedence.Bitwise ? Bitwise.{^.Precedence.Bitwise,>>.Associativity,>>>.Associativity} > >> ^ >>> // 70 >> 2 ^ 73 >>> 3 > Type: expression Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.>>>.Precedence.Other - 850 // Precedence with respect to arithmetic operators // Precedence >>> with + # 850 Bitwise.>>>.Precedence.Other > // + >>> [] + >>> // 30 + 25 >>> 2 > Type: expression Hardness: 20 // Precedence >>> with - # 851 Bitwise.>>>.Precedence.Other > // >>> - [,] >>> - // 71 >>> 5 - 3 > Type: expression Hardness: 20 // // Precedence >>> with post ++ // # 852 // Bitwise.>>>.Precedence.Other // > // >>> ++ // // 48 >>> 3 ++ // > // Type: expression // Hardness: 20 // // // Precedence >>> with pre -- // # 853 // Bitwise.>>>.Precedence.Other // > // -- >>> // // -- 81 >>> 2 // > // Type: expression // Hardness: 20 // Precedence >>> with * # 852 Bitwise.>>>.Precedence.Other > * >>> // 7 * 9 >>> 2 > Type: expression Hardness: 20 // Precedence >>> with / # 853 Bitwise.>>>.Precedence.Other > // >>> / [,] >>> / // 59 >>> 5 / 2 > Type: expression Hardness: 20 // Precedence >>> with % # 854 Bitwise.>>>.Precedence.Other > // >>> % [,,] >>> % // 61 >>> 73 % 3 > Type: expression Hardness: 20 // Precedence of >>> with relational operators // In Java - return value of a relational expression is a boolean // In C++ - return value of a relational expression is an integer // Precedence >>> with > # 860 Bitwise.>>>.Precedence.Other > >>> > // 89 >>> 2 > 57 > Type: expression Hardness: 20 // Precedence >>> with <= # 861 Bitwise.>>>.Precedence.Other > <= >>> // 62 <= 49 >>> 2 > Type: expression Hardness: 20 // Precedence >>> with == and && # 862 Bitwise.>>>.Precedence.Other > == >>> && true // 39 == 87 >>> 2 && true > Type: expression Hardness: 25 / Precedence >>> with > and || # 863 Bitwise.>>>.Precedence.Other > false || >>> > // false || 78 >>> 2 > 66 > Type: expression Hardness: 25 // -------------------------------------------------------------------------- // Bitwise.>>>.Associativity - 875 // Three operands, the right two operands are positive // Left operand is positive # 875 Bitwise.>>>.Associativity > >>> >>> // 85 >>> 2 >>> 3 > Type: expression Hardness: 20 // Left operand is negative # 876 Bitwise.>>>.Associativity > // >>> >>> >>> >>> // -77 >>> 28 >>> 2 > Type: expression Hardness: 20 // Right operand is 0, left operand is positive # 877 Bitwise.>>>.Associativity > >>> >>> 0 // 67 >>> 2 >>> 0 > Type: expression Hardness: 20 // Precedence >>> and << # 880 Bitwise.>>>.Associativity ? Bitwise.<<.Associativity > << >>> // 9 << 3 >>> 2 > Type: expression Hardness: 20 // Precedence >>> and << # 881 Bitwise.>>>.Associativity ? Bitwise.<<.Associativity > >>> << // 15 >>> 3 << 2 > Type: expression Hardness: 20 // Precedence >>> and >> # 882 Bitwise.>>>.Associativity ? Bitwise.>>.Associativity > >> >>> // 9 >> 3 >>> 2 > Type: expression Hardness: 20 // Precedence >>> and >> # 883 Bitwise.>>>.Associativity ? Bitwise.>>.Associativity > >>> >> // 45 >>> 3 >> 2 > Type: expression Hardness: 20 // Four operands, left operand is positive # 885 Bitwise.>>>.Associativity > >>> >>> >>> 1 // 73 >>> 1 >>> 2 >>> 1 > Type: expression Hardness: 25 // Pretest problem # 886 Bitwise.>>>.Associativity > [,] >>> - << // 24 >>> 7 - 3 << 2 > Type: expression Hardness: 25 // Posttest problem # 887 Bitwise.>>>.Associativity > [,] >>> << - // 73 >>> 2 << 7 - 3 > Type: expression Hardness: 25 // ------------------------------------------------------------------------------ // // Used to test that Help Button does not show up if either operand is an error // # 1250 // Bitwise.&.Correct // > // // Right operand is error // // ~( 9 / 0 ) // // Left operand is error // 9 / 0 & 5 + 3 // // Both operands are error in C++ // // 13 % 3.5 & 9 / 0 // > // Type: expression // Hardness: 30 // Used to test compound assignment operators # 900 Bitwise.&.Correct > // BitAndAssign // {=; &= ;} // BitOrAssign // {=; |= ;} // BitXorAssign // {=; ^= ;} // LeftShiftAssign // {=; <<= ;} // RightShiftAssign // {=; >>= ;} // Used for help menu 4 & 6 > Type: expression Hardness: 30 // ------------------------------------------------------------------------------ // Templates here are for demonstration purposes // Included at the end so that regular practice does not pick up these templates // How to convert positive numbers # 90 Demonstration > | 0 > Type: expression Hardness: 10 // How to convert negative numbers # 91 Demonstration > | 0 > Type: expression Hardness: 20 // How to enter error values # 92 Demonstration > / 0 > Type: expression Hardness: 20 // --------------------------------------------------------------------------