Consider the following recursive Java function f that takes two long arguments and returns a float value: public static float f (long m, long n) { float result = (float)m / (float)n; if(m < 0 | n < 0) return 0.of; else result - = f(m * 2,n * 3); return result ; } Which of the following real values best approximates the value of f (1, 3) ?

Consider the following recursive Java function f that takes two long arguments and returns a float value: public static float f (long m, long n) { float result = (float)m / (float)n; if(m < 0 | n < 0) return 0.of; else result - = f(m * 2,n * 3); return result ; } Which of the following real values best approximates the value of f (1, 3) ? Correct Answer 0.2

The correct answer is option 1.

Key Points

The function f(1,3) pass the values to m,n. Then the value will typecast to float and result=0.3333. Then it enters into else statement the function f is f(2,9). 

And finally it returns result as 0.20000003.
∴ Hence the correct answer is 0.2.

Related Questions

Read the passage carefully and select the best answer to each question out of the given four alternatives.
Public opinion may be passive and false or active and real. It is claimed in theory that all governments are ultimately based on the opinion or sanction of the governed. But we find that in practice the people's rights are often trodden down and tyranny and oppression are allowed to continue. The government does it not because the people want it to do so but because they are too idle, too uneducated and too disunited or timid to oppose the govern ment. Such public opinion is passive and false and not an active verdict. But when we find people alert, intelligent and determined to let the government know their will, when they want to exercise actively their voice in the management of their country, we have an instance of true or active public opinion. True public opinion is formed by and expressed through the press, the platform, political parties and educational institutions. These have sacred duties to perform, duties on which depends the ultimate good of the entire community. The press today wields a tremendous influence, So it should support the causes and move ments and condemn the wrong one's and thus teach people to form correct opinion. A free and fair press ventilates the grievances of the public. Thus a healthy relationship develops between the people and the government through out an unbiased press. Political parties also help to create and regulate opinions. No less important part is played by the educational Institutions which train the minds of the young people who will be the citizens of tomorrow. It has been said that modern Germany and China have been made by their universities. It is necessary that the young and the growing minds should imbibe the spirit of fellow-feeling, the spirit of tolerance, the habit of compromise, and show due regard for the feelings and opinion of others without which a democratic society cannot function, let alone succeed. When there is true awakening of the people, we shall have the real and conscious public opinion. And justice will reign on earth and truly will the voice of the people be the voice of God.
Which of the following is not the reason for the oppression caused to general public by the running government in the country?
Read the passage carefully and select the best answer to each question out of the given four alternatives.
Public opinion may be passive and false or active and real. It is claimed in theory that all governments are ultimately based on the opinion or sanction of the governed. But we find that in practice the people's rights are often trodden down and tyranny and oppression are allowed to continue. The government does it not because the people want it to do so but because they are too idle, too uneducated and too disunited or timid to oppose the govern ment. Such public opinion is passive and false and not an active verdict. But when we find people alert, intelligent and determined to let the government know their will, when they want to exercise actively their voice in the management of their country, we have an instance of true or active public opinion. True public opinion is formed by and expressed through the press, the platform, political parties and educational institutions. These have sacred duties to perform, duties on which depends the ultimate good of the entire community. The press today wields a tremendous influence, So it should support the causes and move ments and condemn the wrong one's and thus teach people to form correct opinion. A free and fair press ventilates the grievances of the public. Thus a healthy relationship develops between the people and the government through out an unbiased press. Political parties also help to create and regulate opinions. No less important part is played by the educational Institutions which train the minds of the young people who will be the citizens of tomorrow. It has been said that modern Germany and China have been made by their universities. It is necessary that the young and the growing minds should imbibe the spirit of fellow-feeling, the spirit of tolerance, the habit of compromise, and show due regard for the feelings and opinion of others without which a democratic society cannot function, let alone succeed. When there is true awakening of the people, we shall have the real and conscious public opinion. And justice will reign on earth and truly will the voice of the people be the voice of God.
According to the passage, which of the following is needed from the people to have true or active public opinion? 1. Alertness
2. Determination
3. Intelligence
4. Raising their voice
Read the passage carefully and select the best answer to each question out of the given four alternatives.
Public opinion may be passive and false or active and real. It is claimed in theory that all governments are ultimately based on the opinion or sanction of the governed. But we find that in practice the people's rights are often trodden down and tyranny and oppression are allowed to continue. The government does it not because the people want it to do so but because they are too idle, too uneducated and too disunited or timid to oppose the govern ment. Such public opinion is passive and false and not an active verdict. But when we find people alert, intelligent and determined to let the government know their will, when they want to exercise actively their voice in the management of their country, we have an instance of true or active public opinion. True public opinion is formed by and expressed through the press, the platform, political parties and educational institutions. These have sacred duties to perform, duties on which depends the ultimate good of the entire community. The press today wields a tremendous influence, So it should support the causes and move ments and condemn the wrong one's and thus teach people to form correct opinion. A free and fair press ventilates the grievances of the public. Thus a healthy relationship develops between the people and the government through out an unbiased press. Political parties also help to create and regulate opinions. No less important part is played by the educational Institutions which train the minds of the young people who will be the citizens of tomorrow. It has been said that modern Germany and China have been made by their universities. It is necessary that the young and the growing minds should imbibe the spirit of fellow-feeling, the spirit of tolerance, the habit of compromise, and show due regard for the feelings and opinion of others without which a democratic society cannot function, let alone succeed. When there is true awakening of the people, we shall have the real and conscious public opinion. And justice will reign on earth and truly will the voice of the people be the voice of God.
Who among the following has tremendous influence in forming the true public opinion?
Read the passage carefully and select the best answer to each question out of the given four alternatives.
Public opinion may be passive and false or active and real. It is claimed in theory that all governments are ultimately based on the opinion or sanction of the governed. But we find that in practice the people's rights are often trodden down and tyranny and oppression are allowed to continue. The government does it not because the people want it to do so but because they are too idle, too uneducated and too disunited or timid to oppose the govern ment. Such public opinion is passive and false and not an active verdict. But when we find people alert, intelligent and determined to let the government know their will, when they want to exercise actively their voice in the management of their country, we have an instance of true or active public opinion. True public opinion is formed by and expressed through the press, the platform, political parties and educational institutions. These have sacred duties to perform, duties on which depends the ultimate good of the entire community. The press today wields a tremendous influence, So it should support the causes and move ments and condemn the wrong one's and thus teach people to form correct opinion. A free and fair press ventilates the grievances of the public. Thus a healthy relationship develops between the people and the government through out an unbiased press. Political parties also help to create and regulate opinions. No less important part is played by the educational Institutions which train the minds of the young people who will be the citizens of tomorrow. It has been said that modern Germany and China have been made by their universities. It is necessary that the young and the growing minds should imbibe the spirit of fellow-feeling, the spirit of tolerance, the habit of compromise, and show due regard for the feelings and opinion of others without which a democratic society cannot function, let alone succeed. When there is true awakening of the people, we shall have the real and conscious public opinion. And justice will reign on earth and truly will the voice of the people be the voice of God.
What is important for the democratic society to function properly?
The question given below consists of a statement, followed by three arguments I, II and III. You have to decide which of the arguments is/are ‘strong’ arguments, is/are ‘weak’ arguments and accordingly choose your answer from the alternatives given below each question. Statement: Over the past five decades, term deposits in banks have emerged as the primary instrument of financial savings for the average Indian after former premier Indira Gandhi embarked on a mission to nationalise the lenders - 14 in the first tranche - on a rainy afternoon in July 1969. Coming with an unsaid sovereign guarantee of sorts, fixed deposits (FDs) seemingly offered investors liquidity - and safety - as nationalisation sought, in part, to arrest the 40-odd bank failures a year.  Now, however, deposits must burnish their allure to retain leadership status in an increasingly crowded financial marketplace that offers choice. Why? Arguments: I. If FDs are giving 7.5% and the effective tax rate is 10%, one gets close to 5-5.2% return. Similarly, in the case of FMP, if the rate is 7.5%, effective taxation comes to 10%, one gets 6.75%. It is higher than the effective returns on bank deposits.  II. People are becoming aware of more asset classes that offer better returns, and the quest for such assets became more pronounced after interest rates fell substantially over the past four years.  III. Savers are looking at mutual funds and provident funds for the higher return.