Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Honored Contributor I
771 Views

printf() and integer type

Hello! 

 

I have a problem with printf() command. 

 

For this: 

 

int a = 5; 

printf (a); 

 

Eclipse send me warning passing argument 1 of 'printf' makes pointer from integer without a cast 

and nothing is printed in console. 

 

What's the reason of this? 

 

Thanks.
0 Kudos
2 Replies
Highlighted
Honored Contributor I
8 Views

try: 

 

printf("%d", a); 

 

C language is different from Basic.
0 Kudos
Highlighted
Honored Contributor I
8 Views

Oh, it works, thanks a lot!

0 Kudos