C 언어 파일 조작 5 - 파일의 상용 함수

4836 단어
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>


//stdin:        ,       。
//stdout:        ,        。
//stderr:          ,        。
//stderr stdout        ,  stdout             , stderr         ,      
void main(){
    printf("
----------printf-----------------
"); printf("
"); fprintf(stdout,"
"); // //printf fprintf ,printf , fprintf printf("
-----------puts----------------
"); puts(" , !
");// fputs(" , !
", stdout); //puts fputs ,puts , fputs printf("
-----------putchar----------------
"); putchar('A');// printf("
"); fputc('A', stdout); printf("
"); //putchar fputc ,putchar , fputc printf("
-----------putchar----------------
"); putchar('A');// printf("
"); fputc('A', stdout); printf("
"); //putchar fputc ,putchar , fputc printf("
-----------scanf----------------
"); /*int num = 0; scanf("%d",&num); printf("num==%d
",num); int numA = 0; fscanf(stdin,"%d", &numA); printf("numA==%d
", numA);
*/ //scanf fscanf ,scanf , fscanf printf("
-----------gets----------------
"); //char str1[30] = {0}; ////gets(str1);// , str1 //fgets(str1, sizeof(str1)-1, stdin);// ////fgets( , , );sizeof(str1)-1 '\0' //fputs(str1, stdout); //gets fgets printf("
-----------getchar----------------
"); //char ch = '\0'; ////ch = getchar();//getchar() , //ch = fgetc(stdin);//fgetc //fputc(ch, stdout); //getchar fgetc printf("
-----------_getw----------------
"); // int w = _getw(stdin);//_getw() 4 //_getw() 4 , --- , _putw(w,stdout);//_putw() , //_getw() 2 ,1 2 ,int system("pause"); }

좋은 웹페이지 즐겨찾기