- Some characters are stored in integer value inside printf function.
- Printing the value as well as the count of the characters.
- Illustrating the different use of printf().
Below is the C program printing the inside printf:
GeeksForGeeks Int printf("GeeksForGeeks\n ") = 14
Below is the C++ program printing inside cout:
GeeksForGeeks Integer printf("GeeksForGeeks\n") = 14
- In both the above code, printf returns the number of character it has printed successfully.
- “GeeksForGeeks\n” have 14 characters hence it will print 14.
Below is the python program illustrating print():
Explanation: In python3, Print function never returns anything that’s why it is returning None.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course