In a few English sentences provide an algorithm for performi
Solution
Answer - 1
Procedure MakePhoneCall
At first take the phone and check the contact list for the number, if the number
is saved in the contact list then just call the number , otherwise dial the number by entering
it in the phone and call the number
End_MakePhoneCall
Answer - 2
variable - is a symbolic name of memory location which is used to store value.
Answer - 5
The value of enigma is: 12
Answer - 3
string - is a sequence of characters
Answer - 4
a. pi * radius * radius = 3.1415 * 3 * 3 = 3.1415 * 9 = 29.2735
b. String theBard = \"Now is the winter of our discontent\";
length of string theBard is 35
Thus , (\"The quote is \"+theBard.length()+\" characters in length\") will generate (The quote is 35 characters in length)
c. theBard.indexOf(\"our\"), this function will generate 21 as starting index of substring \"our\" is 21 and indexing starts from 0
d. theBard.charAt(6), will generate \' \' (space character) as this function returns the character of the string for the specified index
e. age * 2 = 23 * 2 = 46
f. age % 3 = 2 as if we divide 23 by 3 the 2 remains as remainder, here % is the remainder operator
g. (age % 30) = (23 % 30) = 23 as if we perform integer division then after dividing 23 by 30, 23 remains as remainder
(age / 30) = 0 as age is also integer then here integer division will takes place and result will be 0 (zero)
Thus (age % 30) - (age / 30) = 23 - 0 = 23
