



{"id":4434,"date":"2018-08-23T22:21:21","date_gmt":"2018-08-23T16:51:21","guid":{"rendered":"http:\/\/computersirkiclass.com\/?p=4434"},"modified":"2026-03-18T18:56:53","modified_gmt":"2026-03-18T13:26:53","slug":"c-header-files","status":"publish","type":"post","link":"https:\/\/computersirkiclass.com\/cskc\/c-header-files\/","title":{"rendered":"C++ Header Files"},"content":{"rendered":"<div id=\"modal-ready\"><p>There are many built-in functions in C++ which can be used by a programmer as needed. To allow a build-in function or usage of some pre-fixed declarations C++ provides a concept of header files. Header file primarily contains the function prototypes of built-in functions so that its type checking can be performed and related library can be linked in the compilation and linking process. Some popular functions are listed below. (This is not a comprehensive list, it has been provided for the purpose of reference to clear many +2 and graduate level examinations). Detailed documentation can be referred by clicking over the header filename. The names of header files shown in round brackets below are the versions which are supported on modern IDEs and are required for unicode support. For e.g. we need to use cstring in place of string.h for unicode support.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.cplusplus.com\/reference\/istream\/iostream\/\" target=\"_blank\" rel=\"noopener\"><strong>iostream.h (iostream) <\/strong>input output stream functions<\/a><br \/>\nopen, close, get, getline, read, write, put, seekg, seekp, tellg, tellp, ignore, flush, eof, bad, fail, good, clear<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.cplusplus.com\/reference\/cstdlib\/\" target=\"_blank\" rel=\"noopener\"><strong>stdlib.h (cstdlib) <\/strong>general purpose functions<\/a><strong><br \/>\n<\/strong>atof, atoi, atol, strtod, strtol, strtoul,\u00a0rand, srand,\u00a0calloc, free, malloc, realloc,\u00a0abort, atexit, exit, getenv, system,\u00a0bsearch, qsort,\u00a0abs, div, labs, ldiv<br \/>\nmacro: NULL, RAND_MAX, EXIT_FAILURE, EXIT_SUCCESS<br \/>\nTypes: div_t, ldiv_t, size_t<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.cplusplus.com\/reference\/cstring\/\"><strong>string.h (cstring) <\/strong>manipulate cstring and character arrays<\/a><br \/>\nstrlen, strcpy, strncpy, strcat, strncat, strcmp, strncmp, strchr, strcspn, strpbrk, strrchr, strspn, strstr, strtok, strerror,\u00a0memcpy, memcmp, memmove, memset, memchr,<br \/>\nMacros: NULL, Variables:\u00a0size_t<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.cplusplus.com\/reference\/cctype\/\" target=\"_blank\" rel=\"noopener\"><strong>ctype.h (cctype)<\/strong> classify and transform individual characters<\/a><br \/>\nisalnum, isalpha, isblank, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit, tolower, toupper<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.cplusplus.com\/reference\/cstdio\/\" target=\"_blank\" rel=\"noopener\"><strong>stdio.h (cstdio)<\/strong> handle streams from devices<\/a><br \/>\nfgetc, fgets, fputc, fputs, getc, getchar, gets, putc, putchar,\u00a0puts, ungetc,\u00a0fclose, fflush, fopen, freopen, fread, fwrite, setbuf, setvbuf,\u00a0fread, fwrite, fgetpos, fseek, fsetpos, ftell, rewind, remove, rename,\u00a0feof, clearerr, ferror, perror,\u00a0fprintf, fscanf, printf, scanf, sprintf, sscanf, vfprintf, vprintf, vsprintf<br \/>\nMacros: EOF, BUFSIZE, FILENAME_MAX, FOPEN_MAX, NULL<br \/>\nTypes: FILE, fpos_t, size_t<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.cplusplus.com\/reference\/cmath\/\" target=\"_blank\" rel=\"noopener\"><strong>math.h (cmath)<\/strong> common math operations and transformations<\/a><br \/>\ncos, sin, tan, acos, asin, atan, atan2, cosh, sinh, tanh, exp, frexp, ldexp, log, log10, modf, pow, sqrt, ceil, floor, fmod, fabs, abs<br \/>\nMacros: NAN<br \/>\nTypes: float_t<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.cplusplus.com\/reference\/iomanip\/\" target=\"_blank\" rel=\"noopener\"><strong>iomanip.h (iomanip)<\/strong> providing parametric manipulators<\/a><br \/>\nsetiosflags, resetiosflags, setbase, setfill, setprecision, setw, get_time, put_time<\/p>\n<p>&nbsp;<\/p>\n<p>There are many other header files which are used in c++ prorgamming for e.g. &#8211;<br \/>\nassert.h, errno.h, float.h, limits.h, setjmp.h, signal.h, stdargs.h, stdbool.h, stddef.h, stdint.h, tgmath.h, time.h, wchar.h, wctype.h<\/p>\n<p>Most of the above are used for advanced needs and professional programming. A complete reference can be seen <a href=\"http:\/\/www.cplusplus.com\/reference\/clibrary\/\" target=\"_blank\" rel=\"noopener\">here<\/a><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>There are many built-in functions in C++ which can be used by a programmer as needed. To allow a build-in function or usage of some pre-fixed declarations C++ provides a concept of header files. Header file primarily contains the function prototypes of built-in functions so that its type checking can be performed and related library [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7773,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[114,99,98],"tags":[142,234],"model_paper":[],"class_list":["post-4434","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cnr","category-cpp","category-cpp-all","tag-cp021-functions-built-in","tag-cp330-preprocessor-directives-and-macros","cpp_index-cp5010-built-in-functions","cpp_index-cp9010-preprocessor-directives-and-macros"],"acf":[],"_links":{"self":[{"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/posts\/4434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/comments?post=4434"}],"version-history":[{"count":9,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/posts\/4434\/revisions"}],"predecessor-version":[{"id":4444,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/posts\/4434\/revisions\/4444"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/media\/7773"}],"wp:attachment":[{"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/media?parent=4434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/categories?post=4434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/tags?post=4434"},{"taxonomy":"model_paper","embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/model_paper?post=4434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}