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.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
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
c
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,900
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.
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
Page:
« prev
1
2
3
4
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.
...