{"id":297,"date":"2018-07-04T06:17:40","date_gmt":"2018-07-04T06:17:40","guid":{"rendered":"https:\/\/www.go4expert.com\/tutorials\/?p=297"},"modified":"2018-08-01T01:18:22","modified_gmt":"2018-08-01T01:18:22","slug":"cpp-basic-syntax","status":"publish","type":"post","link":"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/","title":{"rendered":"CPP Basic Syntax and Terms"},"content":{"rendered":"<p>CPP was derived from C and was simply based on the phenomenon of \u2018C with classes\u2019 providing important features such as encapsulation, data abstraction. A CPP program in simple words could also be seen as the collection of objects of one or more class that communicate with each other invoking methods of the respective class. Let now briefly discuss what the above-mentioned term really means<\/p>\n<p><strong>Class:<\/strong> Class in programming languages gives an object-oriented approach to our solution as it not only helps us write code in a better way but also by protecting our data from outside access without permission. In simple language class is a basic template which tells us about the behavior its objects will show.<\/p>\n<p>A class can also be seen as the modification to struct {for those who know C} Though CPP do have struct too but class provides features like data encapsulation which struct does not.<\/p>\n<ul>\n<li><strong>Methods\/functions:<\/strong> A function is basically a set of instruction which we write in our code and whenever we call that function\/method compiler to understand that those set of instructions need to be implemented on the data provided at that instant. It helps to avoid repetition of same code again and again, it also helps in providing modularity to the code hence making it much more readable for other co-developers.<\/li>\n<li><strong>Object:<\/strong> An object is an instance, it may be of a class or struct or any other thing. Object adapts the behavior of its instance like all the variables functions and constants it contains.<\/li>\n<li><strong>Header Files:<\/strong> Let\u2019s consider you are in a library flooded with millions of books, you are here to solve your doubt on a very advanced mathematical program with millions of books there where would you find the answer? \u00a0You would just go to the mathematics section and search for advanced mathematics book and solve your problem. Similarly, there are millions of packages\/libraries developed for our programming languages so at the top we need to tell the compiler we would be using function (an advanced mathematical problem) from this header file (book?).<\/li>\n<\/ul>\n<p>Let\u2019s start with the coding itself now:<\/p>\n<style>.gist table { margin-bottom: 0; }<\/style><div style=\"tab-size: 8\" id=\"gist90878248\" class=\"gist\">\n    <div class=\"gist-file\" translate=\"no\" data-color-mode=\"light\" data-light-theme=\"light\">\n      <div class=\"gist-data\">\n        \n<div class=\"js-gist-file-update-container js-task-list-container\">\n      <div id=\"file-basic-syntax-cpp\" class=\"file my-2\">\n    \n    <div itemprop=\"text\"\n      class=\"Box-body p-0 blob-wrapper data type-c  \"\n      style=\"overflow: auto\" tabindex=\"0\" role=\"region\"\n      aria-label=\"basic-syntax.cpp content, created by shabbirbhimani on 06:15AM on July 21, 2018.\"\n    >\n\n        \n<div class=\"js-check-hidden-unicode js-blob-code-container blob-code-content\">\n\n  <template class=\"js-file-alert-template\">\n  <div data-view-component=\"true\" class=\"flash flash-warn flash-full d-flex flex-items-center\">\n  <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg>\n    <span>\n      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\n      <a class=\"Link--inTextBlock\" href=\"https:\/\/github.co\/hiddenchars\" target=\"_blank\">Learn more about bidirectional Unicode characters<\/a>\n    <\/span>\n\n\n  <div data-view-component=\"true\" class=\"flash-action\">        <a href=\"{{ revealButtonHref }}\" data-view-component=\"true\" class=\"btn-sm btn\">    Show hidden characters\n<\/a>\n<\/div>\n<\/div><\/template>\n<template class=\"js-line-alert-template\">\n  <span aria-label=\"This line has hidden Unicode characters\" data-view-component=\"true\" class=\"line-alert tooltipped tooltipped-e\">\n    <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg>\n<\/span><\/template>\n\n  <table data-hpc class=\"highlight tab-size js-file-line-container\" data-tab-size=\"4\" data-paste-markdown-skip data-tagsearch-path=\"basic-syntax.cpp\">\n        <tr>\n          <td id=\"file-basic-syntax-cpp-L1\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"1\"><\/td>\n          <td id=\"file-basic-syntax-cpp-LC1\" class=\"blob-code blob-code-inner js-file-line\">#include&lt;iostream&gt;  \/\/CPP input output stream header file<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-basic-syntax-cpp-L2\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"2\"><\/td>\n          <td id=\"file-basic-syntax-cpp-LC2\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-basic-syntax-cpp-L3\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"3\"><\/td>\n          <td id=\"file-basic-syntax-cpp-LC3\" class=\"blob-code blob-code-inner js-file-line\">using namespace std;    \/\/always end your line by a semicolon(;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-basic-syntax-cpp-L4\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"4\"><\/td>\n          <td id=\"file-basic-syntax-cpp-LC4\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-basic-syntax-cpp-L5\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"5\"><\/td>\n          <td id=\"file-basic-syntax-cpp-LC5\" class=\"blob-code blob-code-inner js-file-line\">int main(){ \/\/main() it\u2019s here where compiler starts running program from<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-basic-syntax-cpp-L6\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"6\"><\/td>\n          <td id=\"file-basic-syntax-cpp-LC6\" class=\"blob-code blob-code-inner js-file-line\">    cout&lt;&lt;\u201dhello world\u201d; \/\/cout is standard output for cpp<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-basic-syntax-cpp-L7\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"7\"><\/td>\n          <td id=\"file-basic-syntax-cpp-LC7\" class=\"blob-code blob-code-inner js-file-line\">    return 1;<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-basic-syntax-cpp-L8\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"8\"><\/td>\n          <td id=\"file-basic-syntax-cpp-LC8\" class=\"blob-code blob-code-inner js-file-line\">}\/\/ Hurray after this small code you can call yourself a coder :p<\/td>\n        <\/tr>\n  <\/table>\n<\/div>\n\n\n    <\/div>\n\n  <\/div>\n\n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https:\/\/gist.github.com\/shabbirbhimani\/07b505063fdac95d737147de99e0eb89\/raw\/50c8c425dba7df59b8888b0d0d3e1c8a2c252c20\/basic-syntax.cpp\" style=\"float:right\" class=\"Link--inTextBlock\">view raw<\/a>\n        <a href=\"https:\/\/gist.github.com\/shabbirbhimani\/07b505063fdac95d737147de99e0eb89#file-basic-syntax-cpp\" class=\"Link--inTextBlock\">\n          basic-syntax.cpp\n        <\/a>\n        hosted with &#10084; by <a class=\"Link--inTextBlock\" href=\"https:\/\/github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n\n<p>Let\u2019s discuss this small but very important code<\/p>\n<ul>\n<li>The first line \"#include&lt;iostream&gt;\" it is the header file, whenever you write in CPP you have to at least include this file as it brings in the basic CPP functionality.<\/li>\n<li>Coming to second line \u201cusing namespace std;\u201d it tells the compiler to use std namespace everywhere it was included in latest versions of CPP, also observe the semicolon at the end of it. The semicolon in CPP indicates the end of the line and hence needs to be placed at end of every coding line.<\/li>\n<li>The next line \"int main\" it is here where the system starts implementing our code or execution to our code starts.<\/li>\n<li>cout&lt;&lt; helps in printing any text to the screen.<\/li>\n<li>The return statement tells system to terminate the main function here.<\/li>\n<li>\"\/\/\" these two slashes used are a representation of comments the text after it won\u2019t have any effect on your code compiler would simply ignore this text. Comments are just for the understanding of code and are considered as one of the good practices in coding.<\/li>\n<\/ul>\n<p>Now you know how to write a basic code in CPP and what each and everything in it is supposed to mean now comes the time for compiling it. Save this file as hello.cpp and run it from the compiler you installed from the local environment topic, after a successful compilation and execution you will be able to see a screen with Hello World written on it on Linux Terminal (with GCC installed) go to directory in which hello.cpp is present then write \u201cgcc hello.cpp\u201d to compile it if it successfully compiles there would be no message, then after no errors present write\u201d.\/a.out\u201d this price execute the program.<\/p>\n<p>On terminal, it would seem like<\/p>\n<p>@directory$ gcc hello.cpp<br \/>\n@directory$ .\/a.out<br \/>\nhello world<\/p>\n<p>Great going so now you have made system execute one of your programs how it feels? But it is just beginning things are easy if you understand them logically rather than memorizing them.<\/p>\n<h2>Blocks in CPP:<\/h2>\n<p>A block is a set of statements which are linked together or are under one common opening and closing brackets. For example<\/p>\n<style>.gist table { margin-bottom: 0; }<\/style><div style=\"tab-size: 8\" id=\"gist90878394\" class=\"gist\">\n    <div class=\"gist-file\" translate=\"no\" data-color-mode=\"light\" data-light-theme=\"light\">\n      <div class=\"gist-data\">\n        \n<div class=\"js-gist-file-update-container js-task-list-container\">\n      <div id=\"file-blocks-cpp\" class=\"file my-2\">\n    \n    <div itemprop=\"text\"\n      class=\"Box-body p-0 blob-wrapper data type-c  \"\n      style=\"overflow: auto\" tabindex=\"0\" role=\"region\"\n      aria-label=\"blocks.cpp content, created by shabbirbhimani on 06:41AM on July 21, 2018.\"\n    >\n\n        \n<div class=\"js-check-hidden-unicode js-blob-code-container blob-code-content\">\n\n  <template class=\"js-file-alert-template\">\n  <div data-view-component=\"true\" class=\"flash flash-warn flash-full d-flex flex-items-center\">\n  <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg>\n    <span>\n      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\n      <a class=\"Link--inTextBlock\" href=\"https:\/\/github.co\/hiddenchars\" target=\"_blank\">Learn more about bidirectional Unicode characters<\/a>\n    <\/span>\n\n\n  <div data-view-component=\"true\" class=\"flash-action\">        <a href=\"{{ revealButtonHref }}\" data-view-component=\"true\" class=\"btn-sm btn\">    Show hidden characters\n<\/a>\n<\/div>\n<\/div><\/template>\n<template class=\"js-line-alert-template\">\n  <span aria-label=\"This line has hidden Unicode characters\" data-view-component=\"true\" class=\"line-alert tooltipped tooltipped-e\">\n    <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg>\n<\/span><\/template>\n\n  <table data-hpc class=\"highlight tab-size js-file-line-container\" data-tab-size=\"4\" data-paste-markdown-skip data-tagsearch-path=\"blocks.cpp\">\n        <tr>\n          <td id=\"file-blocks-cpp-L1\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"1\"><\/td>\n          <td id=\"file-blocks-cpp-LC1\" class=\"blob-code blob-code-inner js-file-line\">{<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-blocks-cpp-L2\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"2\"><\/td>\n          <td id=\"file-blocks-cpp-LC2\" class=\"blob-code blob-code-inner js-file-line\">  int a;<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-blocks-cpp-L3\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"3\"><\/td>\n          <td id=\"file-blocks-cpp-LC3\" class=\"blob-code blob-code-inner js-file-line\">  a=10;<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-blocks-cpp-L4\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"4\"><\/td>\n          <td id=\"file-blocks-cpp-LC4\" class=\"blob-code blob-code-inner js-file-line\">  cout&lt;&lt;a;<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-blocks-cpp-L5\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"5\"><\/td>\n          <td id=\"file-blocks-cpp-LC5\" class=\"blob-code blob-code-inner js-file-line\">}<\/td>\n        <\/tr>\n  <\/table>\n<\/div>\n\n\n    <\/div>\n\n  <\/div>\n\n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https:\/\/gist.github.com\/shabbirbhimani\/149e1cd7170ec337a58c4b544ced9b8e\/raw\/9bc3261f32f4e60b8f9315995d7c76a3d4bf9083\/blocks.cpp\" style=\"float:right\" class=\"Link--inTextBlock\">view raw<\/a>\n        <a href=\"https:\/\/gist.github.com\/shabbirbhimani\/149e1cd7170ec337a58c4b544ced9b8e#file-blocks-cpp\" class=\"Link--inTextBlock\">\n          blocks.cpp\n        <\/a>\n        hosted with &#10084; by <a class=\"Link--inTextBlock\" href=\"https:\/\/github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n\n<p>Here these three lines are under a common pair of opening and closing brackets which tells about interlinking between them, blocks also helps in defining a scope of the variable, we will learn about it more in coming lectures.<\/p>\n<h2>CPP identifiers:<\/h2>\n<p>CPP identifier represents the name of a variable, class, function, module or any other user-defined item. The identifier can only start with the letter, capital or small, or with the underscore (_) but can contain numbers afterword. Other than Letters, Numbers and Underscore no other character would be considered for naming an Identifier. Also, CPP is a case-sensitive language hence \u201cIdentifierName\u201d and\u201d identifierName\u201d would be considered as two different identifier names.<\/p>\n<p>Examples of some acceptable identifiers:<\/p>\n<ul>\n<li>abc<\/li>\n<li>my_name<\/li>\n<li>Mathematics3<\/li>\n<li>Class_10th<\/li>\n<li>a12345<\/li>\n<li>_abcdef<\/li>\n<\/ul>\n<h2>CPP Reserved words:<\/h2>\n<p>CPP have some reserved words i.e., they can\u2019t be used for naming an identifier as those words are already being used by the language.<\/p>\n<ul>\n<li>asm<\/li>\n<li>else<\/li>\n<li>new<\/li>\n<li>this<\/li>\n<li>auto<\/li>\n<li>enum<\/li>\n<li>operator<\/li>\n<li>throw<\/li>\n<li>bool<\/li>\n<li>explicit<\/li>\n<li>private<\/li>\n<li>true<\/li>\n<li>break<\/li>\n<li>export<\/li>\n<li>protected<\/li>\n<li>try<\/li>\n<li>case<\/li>\n<li>extern<\/li>\n<li>public<\/li>\n<li>typedef<\/li>\n<li>catch<\/li>\n<li>false<\/li>\n<li>register<\/li>\n<li>typeid<\/li>\n<li>char<\/li>\n<li>float<\/li>\n<li>reinterpret_cast<\/li>\n<li>typename<\/li>\n<li>class<\/li>\n<li>for<\/li>\n<li>return<\/li>\n<li>union<\/li>\n<li>const<\/li>\n<li>friend<\/li>\n<li>short<\/li>\n<li>unsigned<\/li>\n<li>const_cast<\/li>\n<li>goto<\/li>\n<li>signed<\/li>\n<li>using<\/li>\n<li>continue<\/li>\n<li>if<\/li>\n<li>sizeof<\/li>\n<li>virtual<\/li>\n<li>default<\/li>\n<li>inline<\/li>\n<li>static<\/li>\n<li>void<\/li>\n<li>delete<\/li>\n<li>int<\/li>\n<li>static_cast<\/li>\n<li>volatile<\/li>\n<li>do<\/li>\n<li>long<\/li>\n<li>struct<\/li>\n<li>wchar_t<\/li>\n<li>double<\/li>\n<li>mutable<\/li>\n<li>switch<\/li>\n<li>while<\/li>\n<li>dynamic_cast<\/li>\n<li>namespace<\/li>\n<li>template<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Understand the basic syntax of CPP along with all reserved keywords and identifiers.<\/p>\n","protected":false},"author":1,"featured_media":287,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[2],"tags":[],"class_list":{"0":"post-297","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-cpp","8":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CPP Basic Syntax and Terms - Go4Expert Tutorials<\/title>\n<meta name=\"description\" content=\"Understand the basic syntax of CPP along with all reserved keywords and identifiers.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CPP Basic Syntax and Terms - Go4Expert Tutorials\" \/>\n<meta property=\"og:description\" content=\"Understand the basic syntax of CPP along with all reserved keywords and identifiers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/\" \/>\n<meta property=\"og:site_name\" content=\"Go4Expert Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-04T06:17:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-08-01T01:18:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.go4expert.com\/tutorials\/wp-content\/uploads\/2018\/06\/cpp.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"770\" \/>\n\t<meta property=\"og:image:height\" content=\"385\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"shabbir\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"shabbir\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/\",\"url\":\"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/\",\"name\":\"CPP Basic Syntax and Terms - Go4Expert Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/#website\"},\"datePublished\":\"2018-07-04T06:17:40+00:00\",\"dateModified\":\"2018-08-01T01:18:22+00:00\",\"author\":{\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/187ce4675295e6b09b98a9374ce2fec6\"},\"description\":\"Understand the basic syntax of CPP along with all reserved keywords and identifiers.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.go4expert.com\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CPP Basic Syntax and Terms\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/#website\",\"url\":\"https:\/\/www.go4expert.com\/tutorials\/\",\"name\":\"Go4Expert Tutorials\",\"description\":\"Programming And Web Development Tutorials\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.go4expert.com\/tutorials\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/187ce4675295e6b09b98a9374ce2fec6\",\"name\":\"shabbir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/303ce933c6bfabf6ac58bc870c696a1d5ef98012ecb820a4a7921853b813406f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/303ce933c6bfabf6ac58bc870c696a1d5ef98012ecb820a4a7921853b813406f?s=96&d=mm&r=g\",\"caption\":\"shabbir\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CPP Basic Syntax and Terms - Go4Expert Tutorials","description":"Understand the basic syntax of CPP along with all reserved keywords and identifiers.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/","og_locale":"en_US","og_type":"article","og_title":"CPP Basic Syntax and Terms - Go4Expert Tutorials","og_description":"Understand the basic syntax of CPP along with all reserved keywords and identifiers.","og_url":"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/","og_site_name":"Go4Expert Tutorials","article_published_time":"2018-07-04T06:17:40+00:00","article_modified_time":"2018-08-01T01:18:22+00:00","og_image":[{"width":770,"height":385,"url":"https:\/\/www.go4expert.com\/tutorials\/wp-content\/uploads\/2018\/06\/cpp.jpg","type":"image\/jpeg"}],"author":"shabbir","twitter_card":"summary_large_image","twitter_misc":{"Written by":"shabbir","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/","url":"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/","name":"CPP Basic Syntax and Terms - Go4Expert Tutorials","isPartOf":{"@id":"https:\/\/www.go4expert.com\/tutorials\/#website"},"datePublished":"2018-07-04T06:17:40+00:00","dateModified":"2018-08-01T01:18:22+00:00","author":{"@id":"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/187ce4675295e6b09b98a9374ce2fec6"},"description":"Understand the basic syntax of CPP along with all reserved keywords and identifiers.","breadcrumb":{"@id":"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.go4expert.com\/tutorials\/cpp-basic-syntax\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.go4expert.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"CPP Basic Syntax and Terms"}]},{"@type":"WebSite","@id":"https:\/\/www.go4expert.com\/tutorials\/#website","url":"https:\/\/www.go4expert.com\/tutorials\/","name":"Go4Expert Tutorials","description":"Programming And Web Development Tutorials","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.go4expert.com\/tutorials\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/187ce4675295e6b09b98a9374ce2fec6","name":"shabbir","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/303ce933c6bfabf6ac58bc870c696a1d5ef98012ecb820a4a7921853b813406f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/303ce933c6bfabf6ac58bc870c696a1d5ef98012ecb820a4a7921853b813406f?s=96&d=mm&r=g","caption":"shabbir"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.go4expert.com\/tutorials\/wp-content\/uploads\/2018\/06\/cpp.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9JSSi-4N","_links":{"self":[{"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/posts\/297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/comments?post=297"}],"version-history":[{"count":9,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/posts\/297\/revisions"}],"predecessor-version":[{"id":334,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/posts\/297\/revisions\/334"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/media\/287"}],"wp:attachment":[{"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/media?parent=297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/categories?post=297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/tags?post=297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}