TCS
Company
Programming
Definition
A function can have several declaration, but only one definition?
A. True
B. False
Read Solution (Total 14)
-
- A.True
It is not sense to define functions more than once...The compiler cannot identify which function to execute if you define functions more than once... It ll throw an error...
But we can declare functions more than once, but all should be identical... - 10 years agoHelpfull: Yes(19) No(0)
- TRUE
If it is defined more than one time then it will throw error! - 10 years agoHelpfull: Yes(2) No(1)
- true
as if functions are defined more than once it will throw compile time error.... - 10 years agoHelpfull: Yes(1) No(0)
- True
If a function is defined twice or thrice the compiler will not be able to identify which function to execute then an error is encountered - 10 years agoHelpfull: Yes(1) No(0)
- True.
The function can defined only once in program.it has several declarations - 10 years agoHelpfull: Yes(0) No(0)
- its true
we cant define function again and again but multiple declaration is possible - 10 years agoHelpfull: Yes(0) No(0)
- TRUE
FUNCTION CAN DEFINE ONLY ONCE DECLARATION BUT SEVERAL DECLARATION CAN POSSIBLE - 10 years agoHelpfull: Yes(0) No(0)
- True
because,the compiler cannot execute the program, it taken the cofussion
- 10 years agoHelpfull: Yes(0) No(0)
- true
bcoz a function can be called several no. of times, but it can only be defined once
- 10 years agoHelpfull: Yes(0) No(0)
- option b is corrrect
- 9 years agoHelpfull: Yes(0) No(0)
- A declaration only tells the compiler how to generate code to call the function. It is okay to tell the compiler the same thing several times(all declarations must be identical).
But a definition results in code to implement the function.With multiple definitions, the compiler will emit multiple copies of the function. Then the linker will see the function defined multiple times and not know which one you are trying to call. So multiple definitions are not allowed. - 8 years agoHelpfull: Yes(0) No(1)
- yes function declaration several .but function name is but argument list is different and data type is different
- 7 years agoHelpfull: Yes(0) No(0)
- true
we cant dfine function again and again but decleare it several times - 4 years agoHelpfull: Yes(0) No(0)
- yes ,it is true
- 2 years agoHelpfull: Yes(0) No(0)
TCS Other Question