Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program using a user-defined function

Posted By: Walda Fischer     Category: C Programming     Views: 13891

Write a Program using a user-defined function.

Code for Program using a user-defined function in C Programming

/*------------------- PROGRAM USING FUNCTION ------------------*/
int mul (int a, int b); /*------- DECLARATION ------------*/
/*-------------------- MAIN PROGRAM BEGINS --------------------*/
main () { int a, b, c; a = 5; b = 10; c = mul (a,b); printf (“multiplication of %d and %d is %d”,a,b,c); } /* ---------------- MAIN PROGRAM ENDS
MUL() FUNCTION STARTS -----------------*/
int mul (int x, int y) int p; p = x*y; { return(p); } /* -------------------- MUL () FUNCTION ENDS ------------------*/
  
Share: 


Didn't find what you were looking for? Find more on Program using a user-defined function Or get search suggestion and latest updates.

Walda Fischer
Walda Fischer author of Program using a user-defined function is from Frankfurt, Germany.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!