C Programming language

adplus-dvertising
Function in C: Pre processor and use of Functions
Previous Home Next

What is a register variable?

A computer can keep data in a register or in memory. A register is much faster in operation than memory but there are very few registers available for the programmer to use. variables are to be stored in a register in order to speed up the execution of the program. compiler probably allows you to use one or more register variables and will ignore additional requests if you request more than are available.

What is prototyping?

A prototype is a model of a real thing and when programming in ANSI-C,ability to define a model of each function for the compiler. The compiler can then use the model to check each of your calls to the function and determine if you have used the correct number of arguments in the function call and if they are of the correct type. By using prototypes, the compiler do some additional error checking. The ANSI standard for C contains prototyping as part of its recommended standard. Every ANSI-C compiler will have prototyping available.

What is pre-processor?

The pre-processor is executed just prior to the execution of the compiler. It's operation is transparent to you but it does a very important job. It removes all comments from the source and performs a lot of textual substitution based on your code, passing the result to the compiler for the actual compilation of your code.

How to use the function?

Before using a function we should declare the function so the compiler has information of function to check and use it correctly. The function implementation has to match the function declaration for all part return data type, function name and parameter list. When you pass the parameter to function, they have to match data type, the order of parameter.

Previous Home Next