• A function is a group of statements in a program that can be
called within a program when needed.
• Customized Function: A user-defined function is a custom function created
by a programmer to perform a specific task or a series of tasks tailored to their
program's requirements.
• Reusability: User-defined functions are designed to be reused throughout a
program. Once defined, you can call the function multiple times, avoiding the
need to rewrite the same code for similar tasks.
• Naming and Parameters: When creating a user-defined function, you give it
a name and define the parameters (input values) it accepts. This allows you to
pass data into the function, which it can process and potentially return a result.
• Inherent to the Language: Predefined functions are integral parts of a
programming language, and they come bundled with the language itself. These
functions perform common tasks or operations that are frequently needed in
programming.
• No Need for Customization: Unlike user-defined functions, you don't need
to write the code for predefined functions. They are readily available, so you can
use them "out of the box" for various purposes, such as mathematical
calculations, string manipulation, or file operations.
• Syntax
• Function Defination
• Function Calling
• No Return Type With No Parameters.
• No Return Type With Parameters.
• Return Type With No Parameters.
• Return Type With Parameters.
function in c programming.pptx

function in c programming.pptx

  • 2.
    • A functionis a group of statements in a program that can be called within a program when needed.
  • 3.
    • Customized Function:A user-defined function is a custom function created by a programmer to perform a specific task or a series of tasks tailored to their program's requirements. • Reusability: User-defined functions are designed to be reused throughout a program. Once defined, you can call the function multiple times, avoiding the need to rewrite the same code for similar tasks. • Naming and Parameters: When creating a user-defined function, you give it a name and define the parameters (input values) it accepts. This allows you to pass data into the function, which it can process and potentially return a result.
  • 4.
    • Inherent tothe Language: Predefined functions are integral parts of a programming language, and they come bundled with the language itself. These functions perform common tasks or operations that are frequently needed in programming. • No Need for Customization: Unlike user-defined functions, you don't need to write the code for predefined functions. They are readily available, so you can use them "out of the box" for various purposes, such as mathematical calculations, string manipulation, or file operations.
  • 5.
    • Syntax • FunctionDefination • Function Calling
  • 6.
    • No ReturnType With No Parameters. • No Return Type With Parameters.
  • 7.
    • Return TypeWith No Parameters. • Return Type With Parameters.