Difference between Puts & Printf

Hamid -  
fiddy Posted messages 441 Registration date   Status Contributeur Last intervention   -
Hello,

I want to know the difference between puts and printf in C language
(void)printf("table[0]=%d, table[1]=%d\n", table[0], table[1]); (void)puts("End of table program"); return EXIT_SUCCESS; 

Thank you!
Configuration: Linux / Firefox 3.6.13

1 réponse

fiddy Posted messages 441 Registration date   Status Contributeur Last intervention   1 847
 
Hello,

printf allows you to display text, format variables, etc.
puts just allows you to display text and adds a newline at the end.
4