`
891633093
  • 浏览: 48964 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

E开头的函数

阅读更多
函数名: ecvt
功 能: 把一个浮点数转换为字符串
用 法: char ecvt(double value, int ndigit, int *decpt, int *sign);
程序例:

#include <stdlib.h>   #include <stdio.h>   #include <conio.h>    int main(void)   {   char *string;   double value;   int dec, sign;   int ndig = 10;    clrscr();   value = 9.876;   string = ecvt(value, ndig, &dec, &sign);   printf("string = %s dec = %d sign = %d\n", string, dec, sign);    value = -123.45;   ndig= 15;   string = ecvt(value,ndig,&dec,&sign);   printf("string = %s dec = %d sign = %d\n",string, dec, sign);     value = 0.6789e5; /* scientific notation */   ndig = 5;   string = ecvt(value,ndig,&dec,&sign);   printf("string = %s dec = %d sign = %d\n", string, dec, sign);    return 0;   } 


函数名: ellipse
功 能: 画一椭圆
用 法: void far ellipse(int x, int y, int stangle, int endangle, int xradius, int yradius);
程序例:

#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 = 0, endangle = 360;   int xradius = 100, yradius = 50;    /* initialize graphics, local variables */   initgraph(&gdriver, &gmode, "");    /* read result of initialization */   errorcode = graphresult();   if (errorcode != grOk)   /* an error occurred */   {   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 ellipse */   ellipse(midx, midy, stangle, endangle,xradius, yradius);    /* clean up */   getch();   closegraph();   return 0;   } 


函数名: enable
功 能: 开放硬件中断
用 法: void enable(void);
程序例:

#include <stdio.h>   #include <dos.h>   #include <conio.h>    /* The clock tick interrupt */   #define INTR 0X1C    void interrupt ( *oldhandler)(void);    int count=0;    void interrupt handler(void)   {   /*   disable interrupts during the handling of the interrupt   */   disable();   /* increase the global counter */   count++;   /*   re enable interrupts at the end of the handler   */   enable();   /* call the old routine */   oldhandler();   }    int main(void)   {   /* save the old interrupt vector */   oldhandler = getvect(INTR);    /* install the new interrupt handler */   setvect(INTR, handler);    /* loop until the counter exceeds 20 */   while (count < 20)   printf("count is %d\n",count);    /* reset the old interrupt handler */   setvect(INTR, oldhandler);    return 0;   }


函数名: eof
功 能: 检测文件结束
用 法: int eof(int *handle);
程序例:

#include <sys\stat.h>   #include <string.h>   #include <stdio.h>   #include <fcntl.h>   #include <io.h>    int main(void)   {   int handle;   char msg[] = "This is a test";   char ch;    /* create a file */   handle = open("DUMMY.FIL",O_CREAT | O_RDWR,S_IREAD | S_IWRITE);    /* write some data to the file */   write(handle, msg, strlen(msg));    /* seek to the beginning of the file */   lseek(handle, 0L, SEEK_SET);    /*   reads chars from the file until hit EOF   */   do   {   read(handle, &ch, 1);   printf("%c", ch);   } while (!eof(handle));    close(handle);   return 0;   }


函数名: exec...
功 能: 装入并运行其它程序的函数
用 法:

int execl(char *pathname, char *arg0, arg1, ..., argn, NULL);   int execle(char *pathname, char *arg0, arg1, ..., argn, NULL,   char *envp[]);   int execlp(char *pathname, char *arg0, arg1, .., NULL);   int execple(char *pathname, char *arg0, arg1, ..., NULL,   char *envp[]);   int execv(char *pathname, char *argv[]);   int execve(char *pathname, char *argv[], char *envp[]);   int execvp(char *pathname, char *argv[]);   int execvpe(char *pathname, char *argv[], char *envp[]); 
程序例:

/* execv example */   #include <process.h>   #include <stdio.h>   #include <errno.h>    void main(int argc, char *argv[])   {   int i;    printf("Command line arguments:\n");   for (i=0; i<argc; i++)   printf("[%2d] : %s\n", i, argv[i]);    printf("About to exec child with arg1 arg2 ...\n");   execv("CHILD.EXE", argv);    perror("exec error");    exit(1);   }


函数名: exit
功 能: 终止程序
用 法: void exit(int status);
程序例:

#include <stdlib.h>   #include <conio.h>   #include <stdio.h>    int main(void)   {   int status;    printf("Enter either 1 or 2\n");   status = getch();   /* Sets DOS errorlevel */   exit(status - '0');    /* Note: this line is never reached */   return 0;   }


函数名: exp
功 能: 指数函数
用 法: double exp(double x);
程序例:

#include <stdio.h>   #include <math.h>    int main(void)   {   double result;   double x = 4.0;    result = exp(x);   printf("'e' raised to the power of %lf (e ^ %lf) = %lf\n",x, x, result);    return 0;   }
分享到:
评论

相关推荐

    C语言函数大全(e开头).pdf

    C语言函数大全(e开头).pdfC语言函数大全(e开头).pdf

    C语言函数手册

    以首字母分类(1): A开头 B开头 C开头 D开头 E开头 F开头 G开头 H开头 I开头 K开头 L开头 以首字母分类(2): M开头 N开头 O开头 P开头 R开头 S开头 T开头 U开头 V开头 W开头 1.字符测试函数 2.字符串操作 3.内存...

    C语言函数手册HTML版

    以首字母分类(1): A开头 B开头 C开头 D开头 E开头 F开头 G开头 H开头 I开头 K开头 L开头 以首字母分类(2): M开头 N开头 O开头 P开头 R开头 S开头 T开头 U开头 V开头 W开头 1.字符测试函数 2.字符串操作 3.内存...

    md5以0e开头的列表.txt

    md5以0e开头的列表 网络攻防中ctf密码学中一些题目所需要运用的md5 MD5信息摘要算法(英语:MD5 Message-Digest Algorithm),一种被广泛使用的密码散列函数,可以产生出一个128位(16字节)的散列值(hash value...

    sql server 命令函数大全

    SQL函数命令大全 S:select abs(-1) value O:select abs(-1) value from dual 2.取整(大) S:select ceiling(-1.001) value O:select ceil(-1.001) value from dual 3.取整(小) S:select floor(-1.001) value O:...

    C语言标准函数库 包括全部常用库函数

    C语言的标准函数库,包括以a b c d e f s t u v w等开头的全部C语言标准函数,希望对大家有帮助。

    PHP常用函数手册大全

    格式以一个%开头,以一个字母结尾,该字母决定输出的数据类型。PHP的类型说明符如表所示。 PHP的类型说明符 类型说明符 说 明 b 输出二进制整数 o 输出八进制整数 x,X 输出十六进制整数,“x”使用小写字母,“X”...

    c++11 符号修饰与函数签名、函数指针、匿名函数、仿函数、std::function与std::bind

    一、符号修饰与函数签名 ...参数以E开头 例子 N::C::func(int) 的函数签名经过修饰为_ZN1N1C4funcEi 2、函数签名 函数签名组成部分:包括函数名,参数类型,参数个数和顺序,以及它所在类和命名空间。 以上任何一

    编写一个函数来验证输入的字符串是否是有效的 IPv4 或 IPv6 地址

    同时,IPv4 地址内的数不会以 0 开头。比如,地址 172.16.254.01 是不合法的。 IPv6 地址由8组16进制的数字来表示,每组表示 16 比特。这些组数字通过 (":")分割。比如, 2001:0db8:85a3:0000:0000:8a2e:0370:7334 是...

    Matlab7库函数使用指南卷一

    Matlab7库函数使用指南卷一 ,以A到E开头的函数,英文版

    webpack工具,很方便 直接导出使用

    以自执行函数开头 2.定义导出函数,类似 return e[n].call(r.exports, r, r.exports, d), r.l = !0, r.exports 3.为导出函数添加多个方法,类似d.e,d.m,d.n等等 -m 函数模块的js路径 函数模块的js特征: 1.一般...

    c语言库函数大全.rar(Word版本)

    函数大全(a开头) .doc 函数大全(b开头) .doc 函数大全(c开头) .doc 函数大全(d开头) .doc 函数大全(e开头) .doc

    Lotus公式语言函数简介

    公式语言函数简介 -------------------------------------------------------------------------------- @Abs 返回一个数字的绝对值 @Abstrcat 将一个或多个域中的内容缩写 @Accessed 指出最后一次访问(即读取或...

    elfun18:elfun18 是一组函数,可以计算各种椭圆积分和函数。-matlab开发

    在后一种情况下,函数名称以 m 开头。 不完全椭圆积分以 Jacobi 形式、Legendre 形式和 Jacobi 的第二形式(Epsilon 函数和 Lambda 函数)给出。 功能列表: 椭圆积分: - Bulirsch 的椭圆积分:cel、cel1、cel2、...

    C语言编程宝典C语言编程宝典

    《C语言编程宝典》 说明: 作者:王大刚 分为基础篇和函数篇 基础篇 1.1 Turbo C语言概述 1.2 ...函数篇 (注:字母表示函数以该字母开头。) A B C D E F G H I K L M O P Q R S T U V W 图形函数 字符屏幕函数

    errno(3) - Linux manual page.pdf

    当linux系统函数出错时,通常会返回一个负值,而且整型变量errno通常被设置为具有特定信息的值。例如,open 函数如果成功执行 则返回一个非负文件描述符,如出错则返回−1。...这些常量都以字符E开头。

    《C语言程序设计》复习提纲

    如12.34e -4,其中,字母e前面的部分称为尾数,可以用实型数据表示,后面的部分称为指数,只能用整型数据表示,而字母e既可以是小写的e,也可以是大写的E。 (3)字符常量,有两种形式:普通字符和转义字符。普通...

    PHP函数之error_reporting(E_ALL ^ E_NOTICE)详细说明

    举例说明: 在Windows环境下:原本在php4.3.0中运行正常的程序,在4.3.1中为何多处报错,大体提示为:Notice:Undefined varialbe:变量名称. 例如有如下的代码: 复制代码 代码如下: if (!... 解决办法: 在程序开头加

    从0 GW不变族计算高阶E弦的椭圆族

    我们表明,仅基于相应椭圆几何的0 Gromov-Witten不变量属可以计算出较高秩E弦的椭圆属。 为了进行计算,我们在未精炼和精炼情况下研究了椭圆纤维Calabi-Yau流形上的拓扑字符串自由能的结构,确定了可挽回的分区函数...

    C++复习资料之系列

    (a) 必须在程序的开头 (b) 必须在程序的后面 ( c ) 可以在程序的任何地方 (d) 必须在其它函数中间 2.用C++语言编制的源程序要变为目标程序必须要经过( d )。 (a) 解释 (b) 汇编 (c) 编辑 (d) 编译 3.C++程序...

Global site tag (gtag.js) - Google Analytics