Question
Which of the following integers best approximates the value of f(2, 3)?
public static float f(long m, long n)
{
float result = (float) m/ (float) n;
if (m < 0 || n< 0)
return 0.0f;
else
result += f(m*2, n*3);
return result;
}
a.
3
b.
2
c.
0
d.
1
Posted under UGC NET computer science question paper Web Technologies
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Consider the following recursive Java function f that takes two long arguments and returns a float value. Which of the following integers best approximates the value of f(2, 3)?
Similar Questions
Discover Related MCQs
Q. The definitions in an XML document are said to be .............. when the tagging system and definitions in the DTD are all in compliance.
View solution
Q. In Java, which of the following statements is/are True?
S1: The ‘final’ keyword applied to a class definition prevents the class from being extended through derivation.
S2: A class can only inherit one class but can implement multiple interfaces.
S3: Java permits a class to replace the implementation of a method that it has inherited. It is called method overloading.
View solution
Q. An XML document that adheres to syntax rules specified by XML 1.0 specification in that it must satisfy both physical and logical structured, is called :
View solution
Q. Which of the following statement(s) is/are TRUE regarding Java Servelets?
(a) A Java Servelet is a server-side component that runs on the web server and extends the capabilities of a server.
(b) A Servelet can use the user interface classes like AWT or Swing.
View solution
Q. Which of the following statements is/are TRUE?
(a) In HTML, character entities are used to incorporate external content into a web page, such as images.
(b) Once a web server returns a cookie to a browser, the cookie will be included in all future requests from the browser to the same server.
View solution
Q. Which of the following statements is/are TRUE regarding JAVA?
(a) Constants that cannot be changed are declared using the ‘static’ keyword.
(b) A class can only inherit one class but can implement multiple interfaces.
View solution
Q. What is the full form of WWW?
View solution
Q. What is the full form of Email?
View solution
Q. What is the full form of FTP?
View solution
Q. What is the full form of LAN?
View solution
Q. ISP is an acronym of
View solution
Q. Which of the following layers of the TCP/IP references model routes packets?
View solution
Q. Networks of computers connected over greater distances are called
View solution
Q. Which of the following is not a layer in the TCP/IP reference model?
View solution
Q. How many bits are their in an IP address?
View solution
Q. Rules contained in programs on router computers that determine the best path on which to send packets are called
View solution
Q. What is the top-level domain in www.yahoo.com/sports
View solution
Q. Which of the following protocols is used to send and receive emails?
View solution
Q. Which of the following protocols is used to transfer files over a network?
View solution
Q. Which of the following is a transport layer protocol in the TCP/IP protocol suite?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Web Technologies? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!