answersLogoWhite

0

Define functions in c

Updated: 8/16/2019
User Avatar

Wiki User

16y ago

Best Answer

type function_name (type1 arg,...)

{

//function body

}

void finc(int arg0)

{

cout << "You entered: " << arg0;

}

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Define functions in c
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can functions be defined in C structures?

No, all functions must be defined outside of C structures. However, all functions in C have a type (the return type) and an identity (an address), so you can define function pointers as members of a structure to achieve the same end.


What is the user defined function section in C language?

There are no 'sections' in C source, you can define functions anywhere, except inside another function or variable/type definition.


What are some of the benefits of programming in C Sharp?

There are many advantages to C sharp programming like: Not having to define the Headers (.h), Classes can be defined within classes, classes and functions can be defined in random order unlike C and C++, Classes and functions don't need to be declared in the program.


What are the functions of a c processor?

The preprocessor handles directives for source file inclusion (#include), macro definitions (#define), and conditional inclusion (#if).


Can an extern function be defined in a C header file?

Declared is the right word. (Don't define functions in headers, unless you really know what you are doing.)


Define class string and implement all the functions related to strings?

define class string


What is the use of define key word in c?

Actually, the preprocessor is not part of the C compiler, but here you are: #define is meant to define symbols. Examples #define NULL ((void *)0) #define getchar() getc(stdin)


Can there be friend functions in c plus plus?

Yes, there can be friend functions in C++.


Which class is used to define the controls in c sharp?

.Ascx class file is used to define the controls in c#


In C can functions be defined inside functions?

Standard C (C89 and C99 are the official standards) does not allow to define functions inside functions (known as nestedfunctions). However, some compilers, such as the free GCC allow nested functions as a language extension.


What are the in-built function in c plus plus?

C++ built-in functions are those functions that are provided for you as part of the language itself, and includes all of the C standard library functions (all of which were inherited from C) and is expanded upon by the C++ standard template library. C++ implementors may provide additional functions that are platform-specific, however these are not considered built-in functions becuase C++ is a cross-platform language. These are best described as 3rd party functions. The functions you yourself write are known as user-defined functions.


What is the importance of using functions in a c program?

C programs do not function without functions.