Write a program that demonstrates the way the sprintf( ) and puts( ) library functions work with strings.
C Programming Language / String in C Language
751Program:
#include int main() { char buf[128]; double x = 1.23456; int i = 0; sprintf(buf,"x = %7.5lf",x); while(i<10) puts(buf+i++); return 0; }
Output:
x = 1.23456 = 1.23456 = 1.23456 1.23456 1.23456 .23456 23456 3456 456 56
Explanation:
None
This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.
# C Tutorials
# JAVA Tutorials
# HTML Tutorials
# Computer Fundamental
# Data Structure
# DBMS Tutorials
SQL
# C# Language
# R Language
# PHP
# Python
# Vue JS