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. oracle记录解锁

    oracle 怎样查一个表中的记录是否被锁住了   怎么查询一个数据库中有几个表引用了其中某个特定表的主键做为其外键的select t.table_name from user_constraints ...

  2. Rate Limiter设计

    先存着,以后再写 http://iamzhongyong.iteye.com/blog/1982113 http://baike.baidu.com/view/2530454.htm https:// ...

  3. Drozer安装

    (1)JDK安装 http://www.cnblogs.com/linbc/p/4319509.html http://blog.csdn.net/qq_31988895/article/detail ...

  4. 关于Linux操作系统下文件特殊权限的解释

    文件特殊权限的解释. -rwsr-xr-x = 4755 文件执行的时候,会以owner的身份来执行,就是setuid . 例如:-rwxr-xr-t 1 root wheel 0 7 9 18:24 ...

  5. Servlet如何实现修改后不重启服务器而生效

    只需在apache-tomcat-8.0.0-RC10\conf\servlet.xml中修改相关设置:   在<Host name="localhost"  appBase ...

  6. Java 数据结构之Stack

    Stack类表示后进先出(LIFO)的对象堆栈.栈是一种非常常见的数据结构.Stack继承Vector,并对其进行了扩展. 用法: 1.只有一个构造函数: public Stack() {} 2.创建 ...

  7. 神经网络:卷积神经网络CNN

    一.前言 这篇卷积神经网络是前面介绍的多层神经网络的进一步深入,它将深度学习的思想引入到了神经网络当中,通过卷积运算来由浅入深的提取图像的不同层次的特征,而利用神经网络的训练过程让整个网络自动调节卷积 ...

  8. A Bug

    A Bug Time Limit:   1000MS       Memory Limit:   65535KB Submissions:   231       Accepted:    Descr ...

  9. springmvc在web.xml中的配置

    <!-- SpringMVC核心分发器 --> <servlet> <servlet-name>dispatcherServlet</servlet-name ...

  10. poj3295Tautology

    http://poj.org/problem?id=3295 这几天补一补poj之前落下的题吧 枚举 #include <iostream> #include<cstdio> ...