6/5/2023 0 Comments Write in c![]() ![]() In C programming, scanf() is one of the commonly used function to take input from the user. To print char, we use %c format specifier. Similarly, we use %lf to print double values. To print float, we use %f format specifier. ![]() Here, the %d inside the quotations will be replaced by the value of testInteger.Įxample 3: float and double Output #include We use %d format specifier to print int types. The return 0 statement inside the main() function is the "Exit status" of the program.To use printf() in our program, we need to include stdio.h header file using the #include statement.The function prints the string inside quotations. ![]()
0 Comments
Leave a Reply. |