0

Problem with "c" in functions

Int sum (int, int) Void main() { Int a=10,b=20,sum,c; c=sum(a, b) ; printf("%d", c) ; } Int sum(int x, int y); { return x+y; }

27th Mar 2019, 12:19 AM
V Chandu
V Chandu - avatar
2 Antworten
+ 2
Semi colon missing I'm first line, you are declaring a prototype, not a function, so semi colon is needed. Second : v of void is capital, it should be small but void main won't work here, so you need to use int main. Use return 0; after printf Function declaration after main, semi colon will give an error as it's for prototype, so remove that.
27th Mar 2019, 1:36 AM
RZK 022
RZK 022 - avatar