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

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -