Saturday, 31 January 2009

Standard C Date & Time

asctimea textual version of the time
clockreturns the amount of time that the program has been running
ctimereturns a specifically formatted version of the time
difftimethe difference between two times
gmtimereturns a pointer to the current Greenwich Mean Time
localtimereturns a pointer to the current time
mktimereturns the calendar version of a given time
setlocalesets the current locale
strftimereturns individual elements of the date and time
timereturns the current calendar time of the system

Standard C Math

absabsolute value
acosarc cosine
asinarc sine
atanarc tangent
atan2arc tangent, using signs to determine quadrants
ceilthe smallest integer not less than a certain value
coscosine
coshhyperbolic cosine
divreturns the quotient and remainder of a division
expreturns “e” raised to a given power
fabsabsolute value for floating-point numbers
floorreturns the largest integer not greater than a given value
fmodreturns the remainder of a division
frexpdecomposes a number into scientific notation
labsabsolute value for long integers
ldexpcomputes a number in scientific notation
ldivreturns the quotient and remainder of a division, in long integer form
lognatural logarithm (to base e)
log10common logarithm (to base 10)
modfdecomposes a number into integer and fractional parts
powreturns a given number raised to another number
sinsine
sinhhyperbolic sine
sqrtsquare root
tantangent
tanhhyperbolic tangent

Monday, 26 January 2009

Keywords in C++

C++'s keywords are a superset of C's keywords. Here is a list of all keywords of the language:

 and        const     float         operator static_cast    using
and_eq const_cast for or struct virtual
asm continue friend or_eq switch void
auto default goto private template volatile
bitand delete if protected this wchar_t
bitor do inline public throw while
bool double int register true xor
break dynamic_cast long reinterpret_cast try xor_eq
case else mutable return typedef
catch enum namespace short typeid
char explicit new signed typename
class extern not sizeof union
compl false not_eq static unsigned

Note the
operator keywords: and, and_eq, bitand, bitor, compl,
not, not_eq, or, or_eq, xor
and xor_eq are symbolic alternatives for,
respectively, &&, &=, &, |, ~, !, !=, ||, |=, ^ and ^=.