-->

Facebook

Jasper Roberts - Blog

Saturday, April 4, 2015

Difference between:



Difference Between gets() and scanf()

gets()
scanf()
1.     It is used to read string.
1.     It is used to read integer, character, float and string also.
2.     It can read string having white space, tabs.
2. It cannot read string having white space.




Difference Between puts() and printf()
puts()  
printf()
1.     It is used to print string.
1.     It is used to print integer, float, character and string also.
%s specifier required to print string.
2.     It will automatically print new line after the string.
2.     It does not automatically print the new line character.
We can provide newline by using “\n”


No comments:

Post a Comment