pre{
line-height:1;
color:#1e1e1e;
background-color:#f0f0f0;
font-size:16px;}.sysFunc{color:#627cf6;font-style:italic;font-weight:bold;}
.selfFuc{color:#800080;}
.bool{color:#d2576f;}
.condition{color:#000080;font-weight:bold;}
.key{color:#000080;}
.var{color:#800000;font-style:italic;}
.Digit{color:#ff00ff;font-weight:bold;}
.includePre{color:#1e1e1e;}
.operator {color:#008000;font-weight:bold;}

函数名: abort 

功  能: 异常终止一个进程 

用  法: void abort(void); 

程序例: 

#include <stdio.h> 
#include <stdlib.h> 
int main(void) 

  printf("Calling abort()\n"); 
  abort(); 
  return 0; /* This is never reached */ 

  
  

函数名: abs 

功  能: 求整数的绝对值 

用  法: int abs(int i); 

程序例: 

#include <stdio.h> 
#include <math.h> 
int main(void) 

  int number = -1234; 
  printf("number: %d  absolute value: %d\n", number, abs(number)); 
  return 0; 

  
  

函数名: absread, abswirte 

功  能: 绝对磁盘扇区读、写数据 

用  法: int absread(int drive, int nsects, int sectno, void *buffer); 

 int abswrite(int drive, int nsects, in tsectno, void *buffer); 

程序例: 

/* absread example */ 
#include <stdio.h> 
#include <conio.h> 
#include <process.h> 
#include <dos.h> 
int main(void) 

  int i, strt, ch_out, sector; 
  char buf[512]; 
  printf("Insert a diskette into drive A and press any key\n"); 
  getch(); 
  sector = 0; 
  if (absread(0, 1, sector, &buf) != 0) 
  { 
     perror("Disk problem"); 
     exit(1); 
  } 
  printf("Read OK\n"); 
  strt = 3; 
  for (i=0; i<80; i++) 
  { 
     ch_out = buf[strt+i]; 
     putchar(ch_out); 
  } 
  printf("\n"); 
  return(0); 

  
  
  

函数名: access 

功  能: 确定文件的访问权限 

用  法: int access(const char *filename, int amode); 

程序例: 

#include <stdio.h> 
#include <io.h> 
int file_exists(char *filename); 
int main(void) 

  printf("Does NOTEXIST.FIL exist: %s\n", 
  file_exists("NOTEXISTS.FIL") ? "YES" : "NO"); 
  return 0; 

int file_exists(char *filename) 

  return (access(filename, 0) == 0); 

  

函数名: acos 

功  能: 反余弦函数 

用  法: double acos(double x); 

程序例: 

#include <stdio.h> 
#include <math.h> 
int main(void) 

  double result; 
  double x = 0.5; 
  result = acos(x); 
  printf("The arc cosine of %lf is %lf\n", x, result); 
  return 0; 

  
  

函数名: allocmem 

功  能: 分配DOS存储段 

用  法: int allocmem(unsigned size, unsigned *seg); 

程序例: 

#include <dos.h> 
#include <alloc.h> 
#include <stdio.h> 
int main(void) 

  unsigned int size, segp; 
  int stat; 
  size = 64; /* (64 x 16) = 1024 bytes */ 
  stat = allocmem(size, &segp); 
  if (stat == -1) 
     printf("Allocated memory at segment: %x\n", segp); 
  else 
     printf("Failed: maximum number of paragraphs available is %u\n", 
            stat); 
  return 0; 

  
  

函数名: arc 

功  能: 画一弧线 

用  法: void far arc(int x, int y, int stangle, int endangle, int radius); 

程序例: 

#include <graphics.h> 
#include <stdlib.h> 
#include <stdio.h> 
#include <conio.h> 
int main(void) 

    /* request auto detection */ 
   int gdriver = DETECT, gmode, errorcode; 
   int midx, midy; 
   int stangle = 45, endangle = 135; 
   int radius = 100; 
   /* initialize graphics and local variables */ 
   initgraph(&gdriver, &gmode, ""); 
   /* read result of initialization */ 
   errorcode = graphresult();    /* an error occurred */ 
   if (errorcode != grOk) 
   { 
      printf("Graphics error: %s\n", grapherrormsg(errorcode)); 
      printf("Press any key to halt:"); 
      getch(); 
      exit(1);    /* terminate with an error code */ 
   } 
   midx = getmaxx() / 2; 
   midy = getmaxy() / 2; 
   setcolor(getmaxcolor()); 
   /* draw arc */ 
   arc(midx, midy, stangle, endangle, radius); 
   /* clean up */ 
   getch(); 
   closegraph(); 
   return 0; 

  
  

函数名: asctime 

功  能: 转换日期和时间为ASCII码 

用  法: char *asctime(const struct tm *tblock); 

程序例: 

#include <stdio.h> 
#include <string.h> 
#include <time.h> 
int main(void) 

   struct tm t; 
   char str[80]; 
   /* sample loading of tm structure  */ 
   t.tm_sec    = 1;  /* Seconds */ 
   t.tm_min    = 30; /* Minutes */ 
   t.tm_hour   = 9;  /* Hour */ 
   t.tm_mday   = 22; /* Day of the Month  */ 
   t.tm_mon    = 11; /* Month */ 
   t.tm_year   = 56; /* Year - does not include century */ 
   t.tm_wday   = 4;  /* Day of the week  */ 
   t.tm_yday   = 0;  /* Does not show in asctime  */ 
   t.tm_isdst  = 0;  /* Is Daylight SavTime; does not show in asctime */ 
   /* converts structure to null terminated 
   string */ 
   strcpy(str, asctime(&t)); 
   printf("%s\n", str); 
   return 0; 

  
  
  

函数名: asin 

功  能: 反正弦函数 

用  法: double asin(double x); 

程序例: 

#include <stdio.h> 
#include <math.h> 
int main(void) 

   double result; 
   double x = 0.5; 
   result = asin(x); 
   printf("The arc sin of %lf is %lf\n", x, result); 
   return(0); 

  
  
  

函数名: assert 

功  能: 测试一个条件并可能使程序终止 

用  法: void assert(int test); 

程序例: 

#include <assert.h> 
#include <stdio.h> 
#include <stdlib.h> 
struct ITEM { 
   int key; 
   int value; 
}; 
/* add item to list, make sure list is not null */ 
void additem(struct ITEM *itemptr) { 
   assert(itemptr != NULL); 
   /* add item to list */ 

int main(void) 

   additem(NULL); 
   return 0; 

  
  
  

函数名: atan 

功  能: 反正切函数 

用  法: double atan(double x); 

程序例: 

#include <stdio.h> 
#include <math.h> 
int main(void) 

   double result; 
   double x = 0.5; 
   result = atan(x); 
   printf("The arc tangent of %lf is %lf\n", x, result); 
   return(0); 

  
  

函数名: atan2 

功  能: 计算Y/X的反正切值 

用  法: double atan2(double y, double x); 

程序例: 

#include <stdio.h> 
#include <math.h> 
int main(void) 

   double result; 
   double x = 90.0, y = 45.0; 
   result = atan2(y, x); 
   printf("The arc tangent ratio of %lf is %lf\n", (y / x), result); 
   return 0; 

  
  

函数名: atexit 

功  能: 注册终止函数 

用  法: int atexit(atexit_t func); 

程序例: 

#include <stdio.h> 
#include <stdlib.h> 
void exit_fn1(void) 

   printf("Exit function #1 called\n"); 

void exit_fn2(void) 

   printf("Exit function #2 called\n"); 

int main(void) 

   /* post exit function #1 */ 
   atexit(exit_fn1); 
   /* post exit function #2 */ 
   atexit(exit_fn2); 
   return 0; 

  
  
  

函数名: atof 

功  能: 把字符串转换成浮点数 

用  法: double atof(const char *nptr); 

程序例: 

#include <stdlib.h> 
#include <stdio.h> 
int main(void) 

   float f; 
   char *str = "12345.67"; 
   f = atof(str); 
   printf("string = %s float = %f\n", str, f); 
   return 0; 

  
  

函数名: atoi 

功  能: 把字符串转换成长整型数 

用  法: int atoi(const char *nptr); 

程序例: 

#include <stdlib.h> 
#include <stdio.h> 
int main(void) 

   int n; 
   char *str = "12345.67"; 
   n = atoi(str); 
   printf("string = %s integer = %d\n", str, n); 
   return 0; 

  
  

函数名: atol 

功  能: 把字符串转换成长整型数 

用  法: long atol(const char *nptr); 

程序例: 

#include <stdlib.h> 
#include <stdio.h> 
int main(void) 

   long l; 
   char *str = "98765432"; 
   l = atol(lstr); 
   printf("string = %s integer = %ld\n", str, l); 
   return(0); 

  

本文使用 书画小说软件 发布,内容与软件无关,书画小说软件 更惬意的读、更舒心的写、更轻松的发布。

 

A.xml的更多相关文章

  1. XStream将java对象转换为xml时,对象字段中的下划线“_”,转换后变成了两个的解决办法

            在前几天的一个项目中,由于数据库字段的命名原因 其中有两项:一项叫做"市场价格"一项叫做"商店价格" 为了便于区分,遂分别将其命名为market ...

  2. .NET Core采用的全新配置系统[9]: 为什么针对XML的支持不够好?如何改进?

    物理文件是我们最常用到的原始配置的载体,最佳的配置文件格式主要由三种,它们分别是JSON.XML和INI,对应的配置源类型分别是JsonConfigurationSource.XmlConfigura ...

  3. WebApi接口 - 响应输出xml和json

    格式化数据这东西,主要看需要的运用场景,今天和大家分享的是webapi格式化数据,这里面的例子主要是输出json和xml的格式数据,测试用例很接近实际常用情况:希望大家喜欢,也希望各位多多扫码支持和点 ...

  4. XML技术之DOM4J解析器

    由于DOM技术的解析,存在很多缺陷,比如内存溢出,解析速度慢等问题,所以就出现了DOM4J解析技术,DOM4J技术的出现大大改进了DOM解析技术的缺陷. 使用DOM4J技术解析XML文件的步骤? pu ...

  5. UWP开发之Mvvmlight实践六:MissingMetadataException解决办法(.Net Native下Default.rd.xml配置问题)

    最近完成一款UWP应用,在手机端测试发布版(Release)的时候应用莫名奇妙的强行关闭,而同样的应用包在PC端一点问题都没有,而且Debug版在两个平台都没有问题,唯独手机的Release版有问题. ...

  6. PHP中遍历XML之SimpleXML

    简单来讲述一些XML吧,XML是可扩展标记语言,是一种用于标记电子文件使其具有结构性的标记语言.XML是当今用于传输数据的两大工具之一,另外一个是json. 我们在PHP中使用XML也是用来传输数据, ...

  7. Asp.Net 操作XML文件的增删改查 利用GridView

    不废话,直接上如何利用Asp.NET操作XML文件,并对其属性进行修改,刚开始的时候,是打算使用JS来控制生成XML文件的,但是最后却是无法创建文件,读取文件则没有使用了 index.aspx 文件 ...

  8. Mybatis XML配置

    Mybatis常用带有禁用缓存的XML配置 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE ...

  9. Drawable实战解析:Android XML shape 标签使用详解(apk瘦身,减少内存好帮手)

    Android XML shape 标签使用详解   一个android开发者肯定懂得使用 xml 定义一个 Drawable,比如定义一个 rect 或者 circle 作为一个 View 的背景. ...

  10. C#反序列化XML异常:在 XML文档(0, 0)中有一个错误“缺少根元素”

    Q: 在反序列化 Xml 字符串为 Xml 对象时,抛出如下异常. 即在 XML文档(0, 0)中有一个错误:缺少根元素. A: 首先看下代码: StringBuilder sb = new Stri ...

随机推荐

  1. Control character in cookie value, consider BASE64 encoding your value

    这是因为你给Cookie设置了中文的value,比如Cookie c = new Cookie("user", "张三");

  2. 每个PHP开发者都应该看的书

    PHP这几年口碑很差.关于它的“糟糕设计的汇总”和语法上的矛盾有着大量的讨论,但是主要的抱怨通常是安全.很多PHP站点分分钟被黑掉,甚至一些有经验的.有见识的程序员会说,这门语言本身是不安全的. 我总 ...

  3. JavaScript 中 2个等号(==)和 3个等号(===)之间的区别

    JavaScript(JS)中有3个和等号(=)相关的操作符:赋值运算符(=).等于(==).恒等于(===). 赋值运算符不多说了. 这里说说等于和恒等于. ==,等于:两边值类型不同的时候,会自动 ...

  4. [HDOJ2604]Queuing(递推,矩阵快速幂)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2604 递推式是百度的,主要是练习一下如何使用矩阵快速幂优化. 递推式:f(n)=f(n-1)+f(n- ...

  5. Hadoop集群(第4期)_SecureCRT使用

    1.SecureCRT简介 SecureCRT是一款支持SSH(SSH1和SSH2)的终端仿真程序,同时支持Telnet和rlogin协议.SecureCRT是一款用于连接运行包括Windows.UN ...

  6. HeadFirst Jsp 05 (属性和监听)

    活用DD, 比如, 我想设置一个email地址, 但是不像在servlet中硬编码, 如果能再web.xml中设置一个参数, 直接拿到这个参数就更好一点. 容器建立一个servlet时, 它会读DD( ...

  7. CreateCompatibleDC与CreateCompatibleBitmap

    函数功能:该函数创建一个与指定设备兼容的内存设备上下文环境(DC). 函数原型:HDC CreateCompatibleDC(HDC hdc): 参数: hdc:现有设备上下文环境的句柄,如果该句柄为 ...

  8. Android uiautomator gradle build system

    This will guide you through the steps to write your first uiautomator test using gradle as it build ...

  9. LA 3905 Meteor

    给出一些点的初始位置(x, y)及速度(a, b)和一个矩形框,求能同时出现在矩形框内部的点数的最大值. 把每个点进出矩形的时刻分别看做一个事件,则每个点可能对应两个事件,进入事件和离开事件. 按这些 ...

  10. Zookeeper工作原理

    ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,它包含一个简单的原语集,分布式应用程序可以基于它实现同步服务,配置维护和命名服务等.Zookeeper是hadoop的一个子项目,其 ...