What is the purpose of the printf() function? Explain with an example.
The printf() function is used to print formatted output to the console. It allows us to display data in a specified format. For example, to print an integer and a floating-point number: int a = 5; float b = 3.14; printf(“a = %d, b = %f”, a, b); This will print “a = 5, b … Read more