MSDN中关于fprintf()的注解
2013-07-13 18:04
120 查看
// crt_fprintf.c
/* This program uses fprintf to format various
* data and print it to the file named FPRINTF.OUT. It
* then displays FPRINTF.OUT on the screen using the system
* function to invoke the operating-system TYPE command.
*/
#include <stdio.h>
#include <process.h>
FILE *stream;
int main( void )
{
int i = 10;
double fp = 1.5;
char s[] = "this is a string";
char c = '\n';
fopen_s( &stream, "fprintf.out", "w" );
fprintf( stream, "%s%c", s, c );//第一个表示输出流,stderr是一个标准错误输出流,第二个参数表示输出格式,第三个参数s,c等表示要输出的变量。
fprintf( stream, "%d\n", i );
fprintf( stream, "%f\n", fp );
fclose( stream );
system( "type fprintf.out" );
}
/* This program uses fprintf to format various
* data and print it to the file named FPRINTF.OUT. It
* then displays FPRINTF.OUT on the screen using the system
* function to invoke the operating-system TYPE command.
*/
#include <stdio.h>
#include <process.h>
FILE *stream;
int main( void )
{
int i = 10;
double fp = 1.5;
char s[] = "this is a string";
char c = '\n';
fopen_s( &stream, "fprintf.out", "w" );
fprintf( stream, "%s%c", s, c );//第一个表示输出流,stderr是一个标准错误输出流,第二个参数表示输出格式,第三个参数s,c等表示要输出的变量。
fprintf( stream, "%d\n", i );
fprintf( stream, "%f\n", fp );
fclose( stream );
system( "type fprintf.out" );
}
相关文章推荐
- 关于struts2的注解
- 2篇msdn上关于语言的文章
- 关于安全的ActiveX控件的编写,纠正大家一点错误,包括MSDN上也有问题
- MSDN中关于CWnd::OnChar()帮助有误?
- Javaweb-------mybatis+springmvc关于实体类使用注解的一个问题
- 关于使用反射无法取得部分注解
- 关于spring中propagation注解的问题
- junit4调试和关于spring注解方面的问题
- 关于aop的两种方式-基于注解和基于aspectj
- 关于spring框架中的注解驱动
- Spring MVC一些常见注解的使用(二) 关于Session的一些注解
- 关于spring3.0注解详解
- MSDN关于RIL的翻译
- 关于一些的注解类型
- Spring学习笔记——关于Spring注解扫描不能注入new对象问题
- Hinton关于RBM的代码注解之(三)mnistclassify.m
- 关于spring mvc Controller的几个注解
- 关于spring的BeanFactory在使用注解的注解事项
- 关于Spring 注解 IOC
- 关于Hibernate注解model操作大字段Clob,字段过长(50000以上)