c function calling error in printf() -


  contains # lt; Stdio.h & gt; #to & lt include, conio.h & gt; Int Adder (Int, Int); Zero main () {int a, b; Printf ("Enter"); scanf ("% d% d", & amp; one, and b); Connector (A, B); Printf ("zodiac is% d", adder); getch (); } Int adder (int x, int y) {returns x + y; }   

This program is not working. I think the code is right. Can you tell the error?

adder is a function, you printf It should have a return value.

And as @ Jonathan Leffler said, if you want to make sure that the output is displayed on time, then adding a new line would be better. Then,

change

  adder (A, B); Printf ("zodiac is% d", adder);   

to:

  Full results = adder (A, B); Printf ("zodiac is% d \ n", the result);   

or:

  printf ("zodiac is% d \ n", adder (A, B));    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -