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. C++:文件的输入和输出

    1.共同的打开文件方式: fin.open("test.txt",ios::binary) fout.open("test.txt",ios::binary) ...

  2. Database Corruption ->> Fix Database In Suspect State

    昨天在工作中遇到一个情况,就是Development环境中的某台服务器上的某个数据库进入了Suspect状态.以前看书倒是知道说这个状态,不过实际工作当中从来没有遇到过.那么一些背景情况是这样的. 环 ...

  3. struts2与struts1整合,java.lang.InstantiationException, Exception occurred during processing request: null

    做了2个action,其中一个运行没有问题,另一个报错,看下面的报错信息,再看了看struts.xml,因为没有给GetBooks这个action配置actionform,所以就导致报null.下面是 ...

  4. eclipse调试jsp中的scriptlet代码

    在eclipse开发环境下,jsp中的scriptlet代码,也就是<%%>中的java代码,跟普通的java代码一样可以打断点单步调试的! 做个笔记,免得自己忘了!

  5. php克隆 自动加载

    PHP加载 include() 函数 include() 函数可获得指定文件中的所有文本,并把文本拷贝到使用 include 函数的文件中. 例子 1 假设您拥有一个标准的页眉文件,名为 " ...

  6. Java并发编程知识总结

    一.线程 1.线程创建: 继承Thread类创建线程类 实现Runnable接口创建线程类 使用Callable和Future创建线程 Runnable是执行工作的独立任务,但是它不返回任何值,如果希 ...

  7. Linux下安装Python-3.3.2【转】

    # 下载最新版本 cd /usr/local/src/ sudo wget http://www.python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2 su ...

  8. arcgis javascript dojo

    一.为什么说ArcGIS API for JavaScript是构建于Dojo之上的? 1. 编写ArcGIS API for JavaScript的ESRI开发者使用Dojo来简化他们的开发过程,同 ...

  9. Eclipse集成Tomcat的配置步骤实例

    使用Eclipse开发B/S结构Web应用时,必须使用Web应用服务器,常见的应用服务器有Tomcat, Jboss, WebLogic, WebSphere, SUN System Applicat ...

  10. eclipse中tomcat使用add and remove无法发布web项目

    继上次启动eclipse中的tomcat报classNotFound的问题后,这次又遇到新问题.就是右键点击tomcat使用add and remove发布web项目至tomcat后,启动tomcat ...