answersLogoWhite

0

yes, we can not declare a function in the body of another function. but if we declare a function in the body of another function then we can call that very function only in that particular function in which it is declared; and that declared function is not known to other functions present in your programme. So if a function is required in almost all functions of your programme so you must declare it outside the main function i.e in the beginning of your programme.

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

Why all variables are declared with in the function?

It is not necessary to to declare variables inside the function in C. If you declare a variable inside a function, the variable becomes local for the function and another variable of same name can be declared in any other function, but you can not use the variable declared in other function. When you declare any variable outside the function body then the variable becomes global and can be used in any function of the program. Note: errno is an example for a variable declared outside any function.


How do you declare local and global variables in pseudo code?

Pseudocode is not a programming language (it's specifically intended for human interpretation), so there is no need to declare variables, you simply define them as and when you require them. For instance: Let x = 42 Let y = x * 2


In C programming language what are the so called functions statement statement block function block and expressions?

Statements are composed from expressions. A semi-colon turns an expression into a statement. A function is not a statement it is a type definition. A statement block is a compound statement, one or more statements delimited by braces, {}. A function block is the body of a function. The body must be enclosed in braces, {}.


What happens if recursion function is declared inline?

An inline function replaces the call to the function by the body of the function, thus reducing the overhead of saving the context in stack. This is good for functions which are small in size and called occasionally. A recursive function calls an instance of itself and thus can be a deeply nested. Different compilers handle this differently. Some will inline it up to a certain depth and then call a non-inlined instance for further recursion; others will not inline the function at all and generate a normal function call.


What is the function of double loop?

that is..

Related Questions

Why all variables are declared with in the function?

It is not necessary to to declare variables inside the function in C. If you declare a variable inside a function, the variable becomes local for the function and another variable of same name can be declared in any other function, but you can not use the variable declared in other function. When you declare any variable outside the function body then the variable becomes global and can be used in any function of the program. Note: errno is an example for a variable declared outside any function.


How do you declare local and global variables in pseudo code?

Pseudocode is not a programming language (it's specifically intended for human interpretation), so there is no need to declare variables, you simply define them as and when you require them. For instance: Let x = 42 Let y = x * 2


What is another term for nonverbal communication?

body language


What is another term for noverbal communication?

Body language.


Which governing body is able to declare war?

which governing body is able to declare war


What is the main function of neurotransmitters?

The main function of neurotransmitters is to transmit signals from one part of the body to another part of the body. Usually, these signals are passed between neurons.


What is another phrase for body language?

Non Verbal Communication. Non Verbal Behaviour.


What is an abevacuation?

An abevacuation is an abnormal evacuation, or the transferral of a disease or bodily function to another area of the body.


If you use body language to communicate in another culture what problem might arise?

Using body language in another culture can lead to misunderstandings or offense because gestures can have different meanings in different cultures. For example, a gesture that is common and harmless in one culture may be considered rude or inappropriate in another culture. It's important to be aware of the specific cultural norms and customs regarding body language when communicating cross-culturally.


How do you prepare counseling interview questions?

first you would probably want to practice speaking with another person on what you are going to say. Then you want to practice your body language because most jobs will study your body language


What are the disadvantages of body language?

Face to face means they can see you. If you are going to tell a lie they may be able to tell by your body language. People can tell a lot by body language. On the other hand an advantage is that you can see there body language. Another disadvantage is if the person you are talking to is violent, they may hit you if you upset them.


What is the function of sacral nerve?

Autonomic nerve function in body