Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
why we use function declaration and when we use it And why we don't use in the below example.
+1
vote
asked
Sep 2, 2019
by
anonymous
main()
{
while(fun());
getch();
}
int fun()
{
static int x=4;
printf("%d",x);
return(--x);
}
functions
Please
log in
or register to answer this question.
1 Answer
0
votes
answered
Sep 17, 2019
by
Raja Sekhar
(
260
points)
The function "fun()" return type is int, so function declaration is not necessary.
As by default function returns integer. If a function returns other than integer it should be declared
Please
log in
or register to add a comment.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...