What is true about the following
C Functions
a.Need not return any value
b.Should always return an integer
c.Should always return a float
d.Should always return more than one value.
Answers were Sorted based on User's Feedback
Answer / arjun
none of options is answer...
so option (a)shud b lyk ..
a) its not necessary to return any value
n dis will b correct in case of return type of function is
void
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / sunayana
d ans. is a.that it is nt neccsary for any c function to
return any value
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / shikhar
yes, the answer is a. In C, the function may or may not
return any value. In new languages like vb, dotnet....these
kind of functions are called "subroutines".
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / vinod
hey guys but when main finishes its execution does it not return any value to the compiler that the main() executed successfully or not .
how will one know that main has executed successfully.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sharana basava
Ya... d ans wil be a. In c the func may or may not returns
d value......so the ans wil ne need not to return d
value... if tis is rit tan the func must have void as a
data type.. like void main..
| Is This Answer Correct ? | 0 Yes | 0 No |
#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }
What is main function in c?
What is the size of structure in c?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
What is the sizeof () a pointer?
In which header file is the null macro defined?
What are variables and it what way is it different from constants?
What is the acronym for ansi?
Explain what are run-time errors?
Write a program that will read the input of any number of digits n in a row of shafh showing the breakdown of the printing and printing figures by the recursive function.
Explain what is the benefit of using an enum rather than a #define constant?
What is operator promotion?