Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336
In a function two return statements should never occur. ?->(Show Answer!)
Question Set

1. In a function two return statements should never occur.



Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 01 Jun 2017 06.01 pm
    No, In a function two return statements can occur but not successively. Example: #include <stdio.h> int mul(int, int); /* Function prototype */ int main() { int a = 0, b = 3, c; c = mul(a, b); printf("c = %d\n", c); return 0; } /* Two return statements in the mul() function */ int mul(int a, int b) { if(a == 0 || b == 0) { return 0; } else { return (a * b); } } Output:
    c = 0
Show Similar Question And Answers
QA->Two statements are given followed by two conclusions I and II. You have to consider the two statements to be true even if they seem to be at variance from commonly known facts. You have to decide which one of the given conclusions is definitely drawn from the given statements. Statement : All virtuous persons are happy. No unhappy person is virtuous. Conclusions : I. Happiness is related to virtue II. Unhappy person is not virtuous.....
QA->If function inside another function is called a _____ Function....
QA->.....is a device by virtue of which two persons at two different places can communicate. It consists of two main parts (i) a microphone and (ii) a receiver.?....
QA->The sum of squares of two numbers is 80 and the square of difference between the two numbers is Find the product of two numbers.....
QA->The two-letter country code domain ".dd" was reserved for which country, but never implemented?....
MCQ->Consider the following statements about conditions that make a metal semiconductor contact rectifying N type semiconductor with work function φs more than work function φM of metalN type semiconductor with work function φs less than work function φM of metalP type semiconductor with work function φs more than work function φM of metalP type semiconductor with work function φs less than work function φM of metal. Of these statements....
MCQ->Which of the following statements are correct about functions used in C#.NET? Function definitions cannot be nested. Functions can be called recursively. If we do not return a value from a function then a value -1 gets returned. To return the control from middle of a function exit function should be used. Function calls can be nested.....
MCQ->In a function two return statements should never occur.....
MCQ->Consider the following about 'return' statement in C On executing the return statement, it immediately transfers the control back to the calling program.There is no restriction on the number of 'return' statements present in a function.The 'return' statement must be present at the end of called function. Which of the above are correct?....
MCQ->Which two statements are true about comparing two instances of the same class, given that the equals() and hashCode() methods have been properly overridden? If the equals() method returns true, the hashCode() comparison == must return true. If the equals() method returns false, the hashCode() comparison != must return true. If the hashCode() comparison == returns true, the equals() method must return true. If the hashCode() comparison == returns true, the equals() method might return true.....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution