Math.h

2.7 math.h The math header defines several mathematic functions. Macros: HUGE_VAL Functions: acos(); asin(); atan(); atan2(); ceil(); cos(); cosh(); exp(); fabs(); floor(); fmod(); frexp(); ldexp(); log(); log10(); modf(); pow(); sin(); sinh(); sqrt(); tan(); tanh(); 2.7.1 Error Conditions All math.h functions handle errors similarly. In the case that the argument passed to the function exceeds the […]

Daha Fazla

mbstowcs

2.13.7.2 mbstowcs Declaration: size_t mbstowcs(schar_t *pwcs, const char *str, size_t n); Converts the string of multibyte characters pointed to by the argument str to the array pointed to by pwcs. It stores no more than n values into the array. Conversion stops when it reaches the null character or n values have been stored. The null character is stored in the array as […]

Daha Fazla

mblen

2.13.7.1 mblen Declaration: int mblen(const char *str, size_t n); Returns the length of a multibyte character pointed to by the argument str. At most n bytes will be examined. If str is a null pointer, then zero is returned if multibyte characters are not state-dependent (shift state). Otherwise a nonzero value is returned if multibyte character are state-dependent. If str is not null, […]

Daha Fazla

time

2.15.10 time Declaration: time_t time(time_t *timer); Calculates the current calender time and encodes it into time_t format. The time_t value is returned. If timer is not a null pointer, then the value is also stored into the object it points to. If the time is unavailable, then -1 is returned. Faydalı Yetersiz

Daha Fazla

strftime

2.15.9 strftime Declaration: size_t strftime(char *str, size_t maxsize, const char *format, const struct tm *timeptr); Formats the time represented in the structure timeptr according to the formatting rules defined in format and stored into str. No more than maxsizecharacters are stored into str (including the terminating null character). All characters in the format string are copied to the str string, including the terminating null character, except for conversion […]

Daha Fazla

mktime

2.15.8 mktime Declaration: time_t mktime(struct tm *timeptr); Converts the structure pointed to by timeptr into a time_t value according to the local time zone. The values in the structure are not limited to their constraints. If they exceed their bounds, then they are adjusted accordingly so that they fit within their bounds. The original values of tm_wday (day of the week) […]

Daha Fazla

localtime

2.15.7 localtime Declaration: struct tm *localtime(const time_t *timer); The value of timer is broken up into the structure tm and expressed in the local time zone. A pointer to the structure is returned. Example: #include<time.h> #include<stdio.h> int main(void) { time_t timer; timer=time(NULL); printf(“The current time is %s.\n”,asctime(localtime(&timer))); return 0; } Faydalı Yetersiz

Daha Fazla

gmtime

2.15.6 gmtime Declaration: struct tm *gmtime(const time_t *timer); The value of timer is broken up into the structure tm and expressed in Coordinated Universal Time (UTC) also known as Greenwich Mean Time (GMT). A pointer to the structure is returned. A null pointer is returned if UTC is not available. Faydalı Yetersiz

Daha Fazla

difftime

2.15.5 difftime Declaration: double difftime(time_t time1, time_t time2); Calculates the difference of seconds between time1 and time2 (time1-time2). Returns the number of seconds. Faydalı Yetersiz

Daha Fazla

ctime

2.15.4 ctime Declaration: char *ctime(const time_t *timer); Returns a string representing the localtime based on the argument timer. This is equivalent to: asctime(locatime(timer)); The returned string is in the following format: DDD MMM dd hh:mm:ss YYYY DDD Day of the week (Sun, Mon, Tue, Wed, Thu, Fri, Sat) MMM Month of the year (Jan, Feb, Mar, […]

Daha Fazla