Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

closed The following C program i have taken from book but output is not coming- Solution required- kindly help.

–10 votes
asked Apr 3, 2018 by Power Murugan (190 points)
closed Sep 26, 2021 by Admin
int mul (int a, int b);
main()
{
    int a, b, c;
    a = 5;
    b = 10;
    c = mul (a,b);
    printf ("multipilcation of %d and %d is %d",a,b,c);
}
    int mul (int x, int y)
    int p;
    {
        p = x*y;
        return(p);
    }
closed with the note: answered

31 Answers

0 votes
answered Jun 28, 2021 by Ramesh Matlapudi (140 points)
#include <stdio.h>

int add (int,int);
int main()
{
    int ans = add(6,9);
    
    printf("ans is %d \n",ans);
    
    return 0;
}
    int add(int i, int j)
    {
        int k = i*j;
        return k;
    }
commented Jun 29, 2021 by Peter Minarik (86,240 points)
Why would you call a function "add" when what it does is multiply?

This is confusing and makes it way harder to understand what the code does.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...