size_t

Defined in header <stddef.h> Defined in header <stdio.h> Defined in header <string.h> Defined in header <time.h> typedef /*implementation-defined*/ size_t; size_t is the unsigned integer type of the result of sizeof , alignof (since C11) and offsetof. Notes size_t can store the maximum size of a theoretically possible object of any type (including array). size_t is commonly used for array indexing and loop counting. Programs that us

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

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

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) {

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_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

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

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

signal

Defined in header <signal.h> void (*signal( int sig, void (*handler) (int))) (int); Sets the error handler for signal sig. The signal handler can be set so that default handling will occur, signal is ignored, or an user-defined function is called. When signal handler is set to a function and a signal occurs, it is implementation defined whether signal(sig, SIG_DFL) will be executed immediately before the start of signal handler. Also, the implementation can prevent some imp

short

Usage short type modifier