Question Set

1. If a function contains two return statements successively, the compiler will generate warnings. Yes/No ?



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
    Yes. If a function contains two return statements successively, the compiler will generate "Unreachable code" warnings. Example: #include<stdio.h> int mul(int, int); /* Function prototype */ int main() { int a = 4, b = 3, c; c = mul(a, b); printf("c = %d\n", c); return 0; } int mul(int a, int b) { return (a * b); return (a - b); /* Warning: Unreachable code */ } Output:
    c = 12
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->The fuel used to generate steam in Kayamkulam thermal power plant is?....
QA->Yes ?....
QA->Yes ബാങ്കിന്റെ CEO യും Managing Director ഉം ആയ വ്യക്തി....
MCQ->If a function contains two return statements successively, the compiler will generate warnings. Yes/No ?....
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 JIT? JIT compiler compiles instructions into machine code at run time. The code compiler by the JIT compiler runs under CLR. The instructions compiled by JIT compilers are written in native code. The instructions compiled by JIT compilers are written in Intermediate Language (IL) code. The method is JIT compiled even if it is not called....
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->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?....
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