sizeof operator

Queries size of the object or type. Used when actual size of the object must be known. Syntax sizeof( type ) (1) sizeof expression (2) Both versions return a value of type size_t. Explanation 1) Returns the size, in bytes, of the object representation of type 2) Returns the size, in bytes, of the object representation of the type of expression Notes Depending on the computer architecture, a byte may consist of 8 or more bits, the exact number provided as CHAR_BIT. si

sizeof

Usage sizeof operator

sinh

Defined in header <math.h> float sinhf( float arg ); (1) (since C99) double sinh( double arg ); (2) long double sinhl( long double arg ); (3) (since C99) Defined in header <tgmath.h> #define sinh( arg ) (4) (since C99) 1-3) Computes hyperbolic sine of arg. 4) Type-generic macro: If the argument has type long double, sinhl is called. Otherwise, if the argument has integer type or the type double, sinh is called. Otherwise, sinhf is

sin

Defined in header <math.h> float sinf( float arg ); (1) (since C99) double sin( double arg ); (2) long double sinl( long double arg ); (3) (since C99) Defined in header <tgmath.h> #define sin( arg ) (4) (since C99) 1-3) Computes the sine of arg (measured in radians). 4) Type-generic macro: If the argument has type long double, sinl is called. Otherwise, if the argument has integer type or the type double, sin is called. Otherwise,

SIG_ERR

Defined in header <signal.h> #define SIG_ERR /* implementation defined */ A value of type void (*)(int). When returned by signal, indicates that an error has occurred. Example #include <stdio.h> #include <stdlib.h> #include <signal.h> void signal_handler(int signal) { printf("Received signal %d\n", signal); } int main(void) { /* Install a signal handler. */ if (signal(SIGTERM, signal_handler) == SIG_ERR) { printf("Error whi

SIG_DFL

Defined in header <signal.h> #define SIG_DFL /*implementation defined*/ #define SIG_IGN /*implementation defined*/ The SIG_DFL and SIG_IGN macros expand into integral expressions that are not equal to an address of any function. The macros define signal handling strategies for signal() function. Constant Explanation SIG_DFL default signal handling SIG_IGN signal is ignored Example #include <signal.h> #include <stdio.h> int main(void) {

sig_atomic_t

Defined in header <signal.h> typedef /* unspecified */ sig_atomic_t; An integer type which can be accessed as an atomic entity even in the presence of asynchronous interrupts made by signals. Example #include <signal.h> #include <stdio.h> volatile sig_atomic_t gSignalStatus = 0; void signal_handler(int signal) { gSignalStatus = signal; } int main(void) { /* Install a signal handler. */ signal(SIGINT, signal_handler); printf("SignalVa

SIGTERM

Defined in header <signal.h> #define SIGTERM /*implementation defined*/ #define SIGSEGV /*implementation defined*/ #define SIGINT /*implementation defined*/ #define SIGILL /*implementation defined*/ #define SIGABRT /*implementation defined*/ #define SIGFPE /*implementation defined*/ Each of the above macro constants expands to an integer constant expression with distinct values, which represent different signals sent to the program. Constant

signed

Usage signed type modifier

signbit

Defined in header <math.h> #define signbit(arg) /* implementation defined */ (since C99) Determines if the given floating point number arg is negative. The macro returns an integral value. Parameters arg - floating point value Return value Nonzero integral value if arg is negative, ​0​ otherwise. Notes This macro detects the sign bit of zeroes, infinities, and NaNs. Along with copysign, this macro is one of the only two portable ways to examine the sign of