Mathematics · Quantitative Aptitude

Number Operations and Properties

974 Questions

Improve your quantitative aptitude with these number operations and properties questions. The topics range from basic subtraction and division to highest common factor and roman numerals. Regular practice of these fundamentals builds speed for exams.

Basic arithmetic operationsHCF and number propertiesRoman numeral calculationsNumber series evaluation

Number Operations and Properties Questions

Multiple choice technology operating systems
  1. 2450

  2. 1275

  3. 1225

  4. 2550

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The for loop iterates through the sequence 1 to 50, so i takes values 1,2,3,...,50 (50 iterations). Inside the loop, 'let i=i+1' increments each value before printing. After the loop, i=50 (last assigned value). The echo prints 50, not a sum. However, this seems to be a trick question - if we sum 1+2+...+50 = 1275, which is option B. The question may intend the sum of the series.

Multiple choice technology mainframe
  1. 004

  2. 030

  3. 3

  4. 003

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

DIVIDE 130 BY 40 GIVING WS-TOTAL computes 130/40 = 3.25, which truncates to 3. WS-TOTAL has PIC 999, so the value is formatted as '003' with leading zeros to fill the 3-digit field. The GIVING phrase stores only the integer quotient, not the remainder.

Multiple choice technology programming languages
  1. 3

  2. 2

  3. 1

  4. 4

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

$MOD performs the modulo operation, returning the remainder after division. When 5 is divided by 3, the quotient is 1 and the remainder is 2, so $MOD(5,3) equals 2.

Multiple choice technology programming languages
  1. '054345''

  2. '0054345''

  3. 54345'0'

  4. d'54345'00'

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

$PAD adds padding characters to the left side of a string to reach the target length. '54345' (5 characters) padded with '0' to length 6 becomes '054345', with one zero added to the left.

Multiple choice technology programming languages
  1. 4

  2. 5

  3. 6

  4. 8

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To solve this question, the user needs to understand the concept of variable assignment and increment operators.

In the given code, we first declare an integer variable named "length" and assign it a value of 4. Then we use the increment operator "++" to increase the value of "length" by 1.

Now, let's go through each option and explain why it is right or wrong:

A. 4: This option is incorrect because the value of "length" is changed by using the increment operator. Therefore, the final value of "length" is not the same as its initial value of 4.

B. 5: This option is correct. The initial value of "length" is 4, and then we increment it by 1 using the "++" operator. Therefore, the final value of "length" is 5.

C. 6: This option is incorrect because if we use two increment operators in succession, then the value of "length" would be 6. However, in this code, there is only one increment operator, so the final value of "length" is 5.

D. 8: This option is incorrect because there is no operation in the given code that would result in the value of "length" being 8. The initial value of "length" is 4, and then we increment it by 1, resulting in a final value of 5.

Therefore, the correct answer is:

The Answer is: B. 5

Multiple choice technology testing
  1. 1000, 5000, 99999

  2. 9999, 50000, 100000

  3. 10000, 50000, 99999

  4. 10000, 99999

  5. 9999, 10000, 50000, 99999, 10000

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

To solve this question, the user needs to know about equivalence classes and boundary testing. Equivalence partitioning is a software testing technique that divides the input data of a software unit into different partitions of valid and invalid data. The purpose of this is to reduce the number of test cases needed to test the software while increasing the effectiveness of the tests. Boundary testing is a software testing technique that checks whether the input data to a software system is at its minimum or maximum limits.

In this question, the valid equivalence classes are numbers between 10000 and 99999 inclusive. The valid boundaries are 10000 and 99999.

Let's go through each option and see which inputs are a result of designing tests for only valid equivalence classes and valid boundaries:

A. 1000, 5000, 99999: Option A includes invalid equivalence classes and is not a result of designing tests for only valid equivalence classes.

B. 9999, 50000, 100000: Option B includes an invalid boundary (100000) and is not a result of designing tests for only valid boundaries.

C. 10000, 50000, 99999: Option C includes valid equivalence classes and valid boundaries. It includes the minimum and maximum values of the valid equivalence classes.

D. 10000, 99999: Option D includes valid boundaries but only one valid equivalence class. It does not include other valid equivalence classes between 10000 and 99999.

E. 9999, 10000, 50000, 99999, 10000: Option E includes invalid equivalence classes (9999 and 10000) and duplicate input (10000). It is not a result of designing tests for only valid equivalence classes and valid boundaries.

Therefore, the correct answer is:

The Answer is: C

Multiple choice technology web technology
  1. 8b1a9953c4611296a827abf8c47804d7

  2. 461707669

  3. f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0

  4. $23413
Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The crc32() function calculates a 32-bit cyclic redundancy checksum of a string and returns it as an integer. For 'Hello world!' the output is 461707669. Options A and C are hexadecimal MD5 hashes (not CRC32), and D is not a valid crc32() output format.

Multiple choice technology
  1. -9999

  2. -1000

  3. -100

  4. -999

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The picture string -$$$$ has 5 positions (1 minus sign + 4 $ positions). For a dollar symbol to appear, at least one $ must remain after the digits occupy their positions. With -999, three digit positions are used, leaving one $ visible, producing -$999. Larger values like -1000 would show no $ symbol.

Multiple choice technology testing
  1. 17

  2. 19

  3. 24

  4. 21

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To solve this question, the user needs to know about Equivalence classes which are used in software testing to divide a set of test cases into groups or sets that can be run together. Each set of test cases represents a particular behavior or functionality of the system under test.

In this question, the text box on the form accepts numeric values in the range of 18 to 25. Therefore, the valid equivalence classes will be the range of values between 18 to 25, including 18 and 25. Any value outside of this range will be an invalid equivalence class.

Now, let's go through each option and identify the invalid equivalence class:

A. 17: This option is not a valid equivalence class because it falls outside of the valid range of values between 18 to 25.

B. 19: This option is a valid equivalence class because it falls within the valid range of values between 18 to 25.

C. 24: This option is a valid equivalence class because it falls within the valid range of values between 18 to 25.

D. 21: This option is a valid equivalence class because it falls within the valid range of values between 18 to 25.

Therefore, the invalid equivalence class is:

A. 17

The answer is: A.

Multiple choice technology testing
  1. 17

  2. 19

  3. 24

  4. 21

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The range of valid inputs is 18 to 25. An invalid equivalence class consists of values outside this range, specifically less than 18 or greater than 25. Thus, 17 represents an invalid equivalence class value, whereas 19, 21, and 24 represent valid equivalence class values.