



{"id":1780,"date":"2017-12-18T21:06:17","date_gmt":"2017-12-18T15:36:17","guid":{"rendered":"http:\/\/computersirkiclass.com\/?p=1780"},"modified":"2026-06-15T16:10:48","modified_gmt":"2026-06-15T10:40:48","slug":"examples-of-valid-indentifiers","status":"publish","type":"post","link":"https:\/\/computersirkiclass.com\/cskc\/examples-of-valid-indentifiers\/","title":{"rendered":"Examples of valid indentifiers"},"content":{"rendered":"<div id=\"modal-ready\"><p>Some rules related to C++ identifiers are as follows:<\/p>\n<ul>\n<li>Can be arbitrarily long alpha numeric (letters and numbers) sequence.<\/li>\n<li>The first character must be a letter.<\/li>\n<li>As an exception _ (underscore) is considered as a letter.<\/li>\n<li>Upper and lower case letters considered different<\/li>\n<li>All characters in the name are considered significant.<\/li>\n<li>C++ Keywords can not be used as identifiers.<\/li>\n<li>Identifiers already used by library functions can not be re-used unless used in a different namespace.<\/li>\n<\/ul>\n<p>Based on above rules let us list out some examples of valid identifiers.<\/p>\n<p><strong>Hello\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 HELLO\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Division\u00a0 \u00a0 \u00a0 \u00a0wonder32\u00a0 \u00a0 \u00a0 \u00a0 _DoIt\u00a0 \u00a0 \u00a0 Do_It\u00a0 \u00a0 \u00a0 CalculateInterest<\/strong><br \/>\n<strong>Calculate_Interest\u00a0 \u00a0 \u00a0 \u00a0TimeOf12<\/strong><\/p>\n<p>Some invalid identifiers are &#8211;<\/p>\n<p><strong>Calc#<\/strong>\u00a0 (# character not allowed)<br \/>\n<strong>21stCentury<\/strong> (Can not begin with a number)<br \/>\n<strong>Data-Record<\/strong>\u00a0 (- character not allowed. one can use _ instead)<br \/>\n<strong>continue<\/strong>\u00a0 \u00a0(It is a reserved keyword)<br \/>\n<strong>file.ext<\/strong>\u00a0 \u00a0 \u00a0 (. character is not allowed)<\/p>\n<p><iframe loading=\"lazy\"  style=\"display: block; margin: 0px auto;\"  id=\"_ytid_97346\"  width=\"1170\" height=\"658\"  data-origwidth=\"1170\" data-origheight=\"658\" src=\"https:\/\/www.youtube.com\/embed\/L862W32kwrI?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  epyt-is-override  no-lazyload\" title=\"YouTube player\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Some rules related to C++ identifiers are as follows: Can be arbitrarily long alpha numeric (letters and numbers) sequence. The first character must be a letter. As an exception _ (underscore) is considered as a letter. Upper and lower case letters considered different All characters in the name are considered significant. C++ Keywords can not [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7778,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[114,99,98],"tags":[91],"model_paper":[],"class_list":["post-1780","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cnr","category-cpp","category-cpp-all","tag-cp003-tokens-keyword-and-identifiers","cpp_index-1030-tokens-keywords-and-identifiers"],"acf":[],"_links":{"self":[{"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/posts\/1780","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=1780"}],"version-history":[{"count":2,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/posts\/1780\/revisions"}],"predecessor-version":[{"id":7777,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/posts\/1780\/revisions\/7777"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/media\/7778"}],"wp:attachment":[{"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/media?parent=1780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/categories?post=1780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/tags?post=1780"},{"taxonomy":"model_paper","embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/model_paper?post=1780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}