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 Feb 17, 2020 by Bannu Muppidi (140 points)
a<b

a is less than b
0 votes
answered Feb 19, 2020 by Piyush Sharma (140 points)
#include <stdio.h>
int main()
{
    int a,b,c;
    printf("enter the value of a,b");
    scanf("%d%d",&a,&b);
    c=a*b;
    printf("the result is %d*%d=%d ",a,b,c);
    return 0;
}
0 votes
answered Feb 19, 2020 by anonymous
int main()
{
    int a=5;
    int b=10;
    int c=mul(5,10);
     printf ("multipilcation of %d and %d is %d",a,b,c);
}
int mul(int x, int y)
{
    return x*y;
}
0 votes
answered Feb 19, 2020 by anonymous

#include<stdio.h>

void main()

{

  int a,b,c;

 a = 5;

   b = 10;
   c = a*b;

printf("Multiplication of %d and %d is %d",a,b,c);

}

 

0 votes
answered Feb 19, 2020 by anonymous
Use headers and then try
0 votes
answered Feb 21, 2020 by anurag girmannagari (140 points)
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);
    }
0 votes
answered Jan 2, 2021 by PK GAMING (140 points)
main()
{
    int a, b, c;
    a = 5;
    b = 10;
    int mul (int a, int b);
    c = mul (a,b);
    printf ("multipilcation of %d and %d is %d",a,b,c);

    return 0;
}
int mul (int x, int y)
{
    int p;
    p = x*y;
    return(p);
}
commented Jan 7, 2021 by Pushpak Chaudhari (100 points)
include<studio.h>

int main()

{

int a=5;

int b=10;

int c = a*b;

printf(" multiple is=%d",a*b);

return 0;

}
0 votes
answered Jan 18, 2021 by Sachin Kumar (140 points)
#include <stdio.h>

int multiply(int a, int b);

int main()

{ int a,b,c;

a=5;

b=10;

c=multiply(a,b);

printf("the multiplication of %d and %d is %d\n",a,b);

return 0;

}

int multiply( int a, int b)

{ int x;

x=a*b:

return x;

}
0 votes
answered Apr 7, 2021 by VEESAM YUGANDHAR (140 points)

#include<stdio.h>       /*ERROR*\
int mul(int x, int y);
int main()
{
    int a, b, c;
    a = 5;
    b = 10;
    c = mul (a,b);
    printf ("multipilcation of %d and %d is %d",a,b,c);
   return 0;
}
    int p;                       /* INTER CHANGED LINE *\
    int mul(int x, int y)
    
    {
        p=x*y;
        return p;
    }

YOUR MISTAKE IS :

!.FORGOTTEN TO INCLUDE HEADER FILE (i.e, #include<stdio.h>)

2.YOU INTER CHANGE THE DECLARION OF P LINE AND DECLARATION OF FUNCTIONS.

0 votes
answered May 30, 2021 by bikash123-c (270 points)
#include <stdio.h>
#include<conio.h>
int main()
{
    int a,b,s;
    printf(" Enter 1st number :");
    scanf("%d",&a);
    printf("Enter 2nd number ");
    scanf(" %d",&b);
    s=a*b;
    printf(" The multiplication of a and b = %d",s);
    
    
    
    
    return 0;
}
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.
...