C语言库函数S类字母1文档格式.docx

上传人:b****5 文档编号:18769323 上传时间:2023-01-01 格式:DOCX 页数:21 大小:20.76KB
下载 相关 举报
C语言库函数S类字母1文档格式.docx_第1页
第1页 / 共21页
C语言库函数S类字母1文档格式.docx_第2页
第2页 / 共21页
C语言库函数S类字母1文档格式.docx_第3页
第3页 / 共21页
C语言库函数S类字母1文档格式.docx_第4页
第4页 / 共21页
C语言库函数S类字母1文档格式.docx_第5页
第5页 / 共21页
点击查看更多>>
下载资源
资源描述

C语言库函数S类字母1文档格式.docx

《C语言库函数S类字母1文档格式.docx》由会员分享,可在线阅读,更多相关《C语言库函数S类字母1文档格式.docx(21页珍藏版)》请在冰豆网上搜索。

C语言库函数S类字母1文档格式.docx

long) 

coreleft());

sbrk(1000);

After 

return 

0;

scanf 

执行格式化输入 

scanf(char 

*format[,argument,...]);

conio.h>

label[20];

name[20];

entries 

loop, 

age;

double 

salary;

struct 

Entry_struct 

float 

entry[20];

/* 

Input 

label 

as 

string 

of 

characters 

restricting 

to 

20 

*/ 

\n\nPlease 

enter 

for 

the 

chart:

"

scanf("

%20s"

label);

fflush(stdin);

flush 

input 

stream 

in 

case 

bad 

number 

an 

integer 

How 

many 

will 

there 

be?

(less 

than 

20) 

%d"

&

entries);

name 

only 

letters 

upper 

or 

lower 

(loop=0;

loop<

entries;

++loop) 

Entry 

%d\n"

loop);

Name 

:

%[A-Za-z]"

entry[loop].name);

age 

Age 

entry[loop].age);

salary 

Salary 

%f"

entry[loop].salary);

name, 

and 

string, 

integer, 

\nPlease 

your 

salary\n"

%20s 

%d 

%lf"

age, 

salary);

Print 

out 

data 

that 

was 

\n\nTable 

%s\n"

label);

Compiled 

by 

%s 

$%15.2lf\n"

-----------------------------------------------------\n"

%4d 

%-20s 

%5d 

%15.2lf\n"

loop 

1, 

entry[loop].name, 

entry[loop].age, 

searchpath 

搜索DOS路径 

*searchpath(char 

*filename);

dir.h>

*p;

Looks 

TLINK 

returns 

pointer 

path 

searchpath("

TLINK.EXE"

Search 

TLINK.EXE 

p);

non-existent 

file 

NOTEXIST.FIL"

NOTEXIST.FIL 

sector 

画并填充椭圆扇区 

void 

far 

sector(int 

x, 

y, 

stangle, 

endangle);

graphics.h>

stdlib.h>

request 

auto 

detection 

gdriver 

DETECT, 

gmode, 

errorcode;

midx, 

midy, 

i;

stangle 

45, 

endangle 

135;

xrad 

100, 

yrad 

50;

initialize 

graphics 

local 

variables 

initgraph(&

gdriver, 

read 

result 

initialization 

errorcode 

graphresult();

if 

(errorcode 

!

grOk) 

error 

occurred 

Graphics 

error:

grapherrormsg(errorcode));

Press 

any 

key 

halt:

getch();

exit

(1);

terminate 

code 

midx 

getmaxx() 

2;

midy 

getmaxy() 

through 

fill 

patterns 

(i=EMPTY_FILL;

i<

USER_FILL;

i++) 

set 

style 

setfillstyle(i, 

getmaxcolor());

draw 

slice 

sector(midx, 

endangle, 

xrad, 

yrad);

clean 

up 

closegraph();

segread 

读段寄存器值 

segread(struct 

SREGS 

*segtbl);

dos.h>

segs;

segread(&

segs);

Current 

segment 

register 

settings\n\n"

CS:

%X 

DS:

%X\n"

segs.cs, 

segs.ds);

ES:

SS:

segs.es, 

segs.ss);

setactivepage 

设置图形输出活动页 

setactivepage(int 

pagenum);

select 

driver 

mode 

supports 

multiple 

pages. 

EGA, 

gmode 

EGAHI, 

ht;

ht 

textheight("

W"

off 

screen 

page 

drawing 

setactivepage

(1);

line 

on 

#1 

line(0, 

0, 

getmaxx(), 

getmaxy());

output 

message 

settextjustify(CENTER_TEXT, 

CENTER_TEXT);

outtextxy(x, 

This 

is 

#1:

y+ht, 

#0 

setactivepage(0);

#0."

view 

visible 

setvisualpage

(1);

setallpallette 

按指定方式改变所有的调色板颜色 

setallpallette(struct 

palette, 

*pallette);

palettetype 

pal;

color, 

maxcolor, 

10;

msg[80];

maxcolor 

getmaxcolor();

grab 

copy 

palette 

getpalette(&

pal);

display 

default 

colors 

(color=1;

color<

=maxcolor;

color++) 

setcolor(color);

sprintf(msg, 

Color:

color);

outtextxy(1, 

msg);

+= 

wait 

black 

one 

setpalette(color, 

BLACK);

restore 

setallpalette(&

setaspectratio 

设置图形纵横比 

setaspectratio(int 

xasp, 

yasp);

yasp, 

midy;

setcolor(getmaxcolor());

get 

current 

aspect 

ratio 

settings 

getaspectratio(&

normal 

circle 

circle(midx, 

100);

claer 

cleardevice();

adjust 

wide 

setaspectratio(xasp/2, 

narrow 

setaspectratio(xasp, 

yasp/2);

setbkcolor 

用调色板设置当前背景颜色 

setbkcolor(int 

background 

colors. 

bkcol, 

y;

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 外语学习 > 法语学习

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1