0017 _ new article. xml

Source: Internet
Author: User
Tags acos asin

??

Function Name :? Abort?

?? Yes :? Terminate a process abnormally?

Use ?? Method :? Void? Abort (void );?

Program example :?

#include?
      
       ?#include?
       
        ?int?main(void)?{???//ddd??printf("Calling?abort()\n");???abort();???return?0;?/*?This?is?never?reached?*/?}?
       
      

??

??

Function Name :? Abs?

?? Yes :? What is the absolute value of an integer?

Use ?? Method :? Int? ABS (Int? I );?

Program example :?

#include?
            
             ?#include?
             
              ?int?main(void)?{???int?number?=?-1234;???printf("number:?%d??absolute?value:?%d\n",?number,?abs(number));???return?0;?}?
             
            

??

??

Function Name :? Absread ,? Abswirte?

?? Yes :? Read and Write Data in absolute disk sectors?

Use ?? Method :? Int? Absread (Int? Drive ,? Int? Nsects ,? Int? Sectno ,? Void? * Buffer );?

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

Program example :?

/*?absread?example?*/?#include?
                  
                   ?#include?
                   
                    ?#include?
                    
                     ?#include?
                     
                      ?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);?}?
                     
                    
                   
                  

??

??

??

Function Name :? Access?

?? Yes :? Are you sure you want to access the file?

Use ?? Method :? Int? Access (const? Char? * Filename ,? Int? Amode );?

Program example :?

#include?
                         
                          ?#include?
                          
                           ?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);?}?
                          
                         

??

Function Name :? ACOs?

?? Yes :? Arccosine function?

Use ?? Method :? Double? ACOs (double? X );?

Program example :?

#include?
                              
                               ?#include?
                               
                                ?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;?}?
                               
                              

??

??

Function Name :? Allocmem?

?? Yes :? Allocate dos storage segments?

Use ?? Method :? Int? Allocmem (unsigned? Size ,? Unsigned? * SEG );?

Program example :?

#include?
                                    
                                     ?#include??#include?
                                     
                                      ?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;?}?
                                     
                                    

??

??

Function Name :? ARC?

?? Yes :? Draw an arc?

Use ?? Method :? Void? Far? ARC (Int? X ,? Int? Y ,? Int? Stangle ,? Int? Endangle ,? Int? Radius );?

Program example :?

#include?
                                          
                                           ?#include?
                                           
                                            ?#include?
                                            
                                             ?#include?
                                             
                                              ?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;?}?
                                             
                                            
                                           
                                          

??

??

Function Name :? Asctime?

?? Yes :? Is the conversion date and time an ascii code?

Use ?? Method :? Char? * Asctime (const? Struct? TM? * Tblock );?

Program example :?

#include?
                                                
                                                 ?#include?
                                                 
                                                  ?#include?
                                                  
                                                   ?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;?}?
                                                  
                                                 
                                                

??

??

??

Function Name :? Asin?

?? Yes :? Arcsin function?

Use ?? Method :? Double? Asin (double? X );?

Program example :?

#include?
                                                       
                                                        ?#include?
                                                        
                                                         ?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);?}?
                                                        
                                                       

??

??

??

Function Name :? Assert?

?? Yes :? Test A condition and possibly terminate the program?

Use ?? Method :? Void? Assert (Int? Test );?

Program example :?

#include??#include?
                                                              
                                                               ?#include?
                                                               
                                                                ?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;?}?
                                                               
                                                              

??

??

??

Function Name :? Atan?

?? Yes :? Arc tangent function?

Use ?? Method :? Double? Atan (double? X );?

Program example :?

#include?
                                                                     
                                                                      ?#include?
                                                                      
                                                                       ?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);?}?
                                                                      
                                                                     

??

??

Function Name :? Atan2?

?? Yes :? Calculate the arc tangent of Y/X?

Use ?? Method :? Double? Atan2 (double? Y ,? Double? X );?

Program example :?

#include?
                                                                           
                                                                            ?#include?
                                                                            
                                                                             ?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;?}?
                                                                            
                                                                           

??

??

Function Name :? Atexit?

?? Yes :? Register the termination function?

Use ?? Method :? Int? Atexit (atexit_t? Func );?

Program example :?

#include?
                                                                                 
                                                                                  ?#include?
                                                                                  
                                                                                   ?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;?}?
                                                                                  
                                                                                 

??

??

??

Function Name :? Atof?

?? Yes :? Convert a string to a floating point number?

Use ?? Method :? Double? Atof (const? Char? * Nptr );?

Program example :?

#include?
                                                                                        
                                                                                         ?#include?
                                                                                         
                                                                                          ?int?main(void)?{????float?f;????char?*str?=?"12345.67";????f?=?atof(str);????printf("string?=?%s?float?=?%f\n",?str,?f);????return?0;?}?
                                                                                         
                                                                                        

??

??

Function Name :? Atoi?

?? Yes :? Convert a string to a growth integer?

Use ?? Method :? Int? Atoi (const? Char? * Nptr );?

program example :?

 # include?

                                                                                               
                                                                                                
? # Include?

                                                                                                
                                                                                                 
? Int? Main (void )? {???? Int? N ;???? Char? * Str? =? "12345.67 ";???? N? =? Atoi (STR );???? Printf ("string? =? % S? Integer? =? % D \ n ",? STR ,? N );???? Return? 0 ;?}?

                                                                                                

                                                                                                

??

??

function name :? Atol?

power ?? Yes :? Convert a string to a growth integer?

use ?? Method :? Long? Atol (const? Char? * Nptr );?

program example :?

 # include?

                                                                                                     
                                                                                                      
? # Include?

                                                                                                      
                                                                                                       
? Int? Main (void )? {???? Long? L ;???? Char? * Str? =? "98765432 ";???? L? =? Atol (lstr );???? Printf ("string? =? % S? Integer? =? % LD \ n ",? STR ,? L );???? Return (0 );?}???

                                                                                                      

                                                                                                      

used in this article? Calligraphy and painting novels? Software Release: the content of the article has nothing to do with the software of calligraphy and painting novels. What is the software of calligraphy and painting novels ?? WordPress website creation tool, code assistant, colorful text color. More comfortable reading, more comfortable writing, and easier Publishing.

0017 _ new article. xml

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.