{"id":12718,"date":"2022-10-01T16:32:01","date_gmt":"2022-10-01T11:02:01","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/"},"modified":"2022-10-01T16:32:01","modified_gmt":"2022-10-01T11:02:01","slug":"solved-c-program-to-count-comment-lines-and","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/","title":{"rendered":"[Solved] C Program to count comment lines (\/\/ and \/* *\/)"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-16846421\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"16846421\" data-parentid=\"16845074\" data-score=\"7\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p>You can write a state machine that should handle most cases.<\/p>\n<p>As you scan the file, you&#8217;ll be in one of the following states:<\/p>\n<ol>\n<li>TEXT &#8211; regular (non-commented) text; this is the state you&#8217;ll start in.  Any newline seen in this state will cause the total-lines counter to be incremented.<\/li>\n<li>SAW_SLASH &#8211; You&#8217;ve seen a single <code>\/<\/code>, which may be the start of a single- or multi-line comment.  If the next character is a <code>\/<\/code>, you&#8217;ll go into the SINGLE_COMMENT state.  If the next character is a <code>*<\/code>, you&#8217;ll go into the MULTI_COMMENT state.  For any other character, you go back into the TEXT state.  <\/li>\n<li>SINGLE_COMMENT &#8211; you&#8217;ve seen the <code>\/\/<\/code> token; you will stay in this state until you see a newline character; once you see the newline character you&#8217;ll increment the number of single-line comments as well as total lines, and go back to the TEXT state.<\/li>\n<li>MULTI_COMMENT &#8211; you&#8217;ve seen the <code>\/*<\/code> token; you will stay in this state until you see the next <code>*\/<\/code> token.  Any newline you see in this state will cause the multi-comment line counter to be incremented along with the total lines.  <\/li>\n<li>SAW_STAR &#8211; While in the MULTI_COMMENT state, you&#8217;ve seen a single <code>*<\/code>.  If the next character is <code>\/<\/code>, you&#8217;ll go back to the TEXT state.  If the next character is <code>*<\/code>, you&#8217;ll stay in the SAW_STAR state.  Otherwise you&#8217;ll go back to the MULTI_COMMENT state.<\/li>\n<\/ol>\n<p>There are edge cases that I&#8217;m not dealing with (such as encountering an EOF while in a comment state), but the following should be a reasonable example of how you can do stuff like this.  <\/p>\n<p>Note that nested comments won&#8217;t be counted; i.e., if a <code>\/\/<\/code>-delimited comment appears within a <code>\/* *\/<\/code>-delimited comment, only the multi-comment counter will be updated.  <\/p>\n<p>You will probably want to factor the counting logic into its own function; just trying to keep the example as straightforward as I can.<\/p>\n<pre><code>#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n\n\/**\n * Count up the number of total lines, single-comment lines,\n * and multi-comment lines in a file.\n *\/\nint main(int argc, char **argv)\n{\n  FILE *fp;\n  int c;\n  unsigned int chars  = 0;\n  unsigned int total  = 0;\n  unsigned int multi  = 0;\n  unsigned int single = 0;\n\n  enum states { TEXT, \n                SAW_SLASH, \n                SAW_STAR, \n                SINGLE_COMMENT, \n                MULTI_COMMENT } state = TEXT;\n\n  if ( argc &lt; 2 )\n  {\n    fprintf(stderr, \"USAGE: %s &lt;filename&gt;\\n\", argv[0]);\n    exit(0);\n  }\n\n  fp = fopen( argv[1], \"r\" );\n  if ( !fp )\n  {\n    fprintf(stderr, \"Cannot open file %s\\n\", argv[1] );\n    exit(0);\n  }\n\n  while ( (c = fgetc( fp )) != EOF )\n  {\n    chars++;\n    switch( state )\n    {\n      case TEXT :\n        switch( c )\n        {\n          case \"https:\/\/stackoverflow.com\/\"  : state = SAW_SLASH; break;\n          case '\\n' : total++; \/\/ fall-through\n          default   : break;\n        }\n        break;\n\n      case SAW_SLASH :\n        switch( c )\n        {\n          case \"https:\/\/stackoverflow.com\/\"  : state = SINGLE_COMMENT; break;\n          case '*'  : state = MULTI_COMMENT; break;\n          case '\\n' : total++; \/\/ fall through\n          default   : state = TEXT; break;\n        }\n        break;\n\n      case SAW_STAR :\n        switch( c )\n        {\n          case \"https:\/\/stackoverflow.com\/\"  : state = TEXT; multi++; break;\n          case '*'  : break;\n          case '\\n' : total++; multi++; \/\/ fall through\n          default   : state = MULTI_COMMENT; break;\n        }\n        break;\n\n      case SINGLE_COMMENT :\n        switch( c )\n        {\n          case '\\n' : state = TEXT; total++; single++; \/\/ fall through\n          default   : break;\n        }\n        break;\n\n      case MULTI_COMMENT :\n        switch( c )\n        {\n          case '*'  : state = SAW_STAR; break;\n          case '\\n' : total++; multi++; \/\/ fall through\n          default   : break;\n        }\n        break;\n\n      default: \/\/ NOT REACHABLE\n        break;\n    }\n  }\n\n  fclose(fp);\n\n  printf( \"File                 : %s\\n\", argv[1] );\n  printf( \"Total lines          : %8u\\n\", total );\n  printf( \"Single-comment lines : %8u\\n\", single );\n  printf( \"Multi-comment lines  : %8u\\n\", multi );\n  return 0;\n}\n<\/code><\/pre>\n<p><strong>EDIT<\/strong><\/p>\n<p>Here&#8217;s a table-driven equivalent to the program above.  I create a <code>state<\/code> table to control state transitions and an <code>action<\/code> table to control what happens when I change state.  <\/p>\n<pre><code>#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n#include &lt;ctype.h&gt;\n\n\/**\n * Using preprocessor macros instead of enums, per request; normally\n * I would use enums, since they obey scoping rules and\n * show up in debuggers.\n *\/\n#define TEXT           0\n#define SAW_SLASH      1\n#define SAW_STAR       2\n#define SINGLE_COMMENT 3\n#define MULTI_COMMENT  4\n\n#define TOTAL_STATES   5\n\n#define NO_ACTION      0\n#define INC_TOTAL      1\n#define INC_SINGLE     2\n#define INC_MULTI      4\n\n\/**\n * This example assumes 7-bit ASCII, for a total of\n * 128 character encodings.  You'll want to change this\n * to handle other encodings.\n *\/\n#define ENCODINGS    128\n\n\/**\n * Need a state table to control state transitions and an action\n * table to specify what happens on a transition.  Each table\n * is indexed by the state and the next input character.\n *\/\nstatic int  state[TOTAL_STATES][ENCODINGS]; \/\/ Since these tables are declared at file scope, they will be initialized to\nstatic int action[TOTAL_STATES][ENCODINGS]; \/\/ all elements 0, which correspond to the \"default\" states defined above.\n\n\/**\n * Initialize our state table.\n *\/\nvoid initState( int (*state)[ENCODINGS] )\n{\n  \/**\n   * If we're in the TEXT state and see a \"https:\/\/stackoverflow.com\/\" character, move to the SAW_SLASH\n   * state, otherwise stay in the TEXT state\n   *\/\n  state[TEXT][\"https:\/\/stackoverflow.com\/\"] = SAW_SLASH;\n\n  \/**\n   * If we're in the SAW_SLASH state, we can go one of three ways depending\n   * on the next character.\n   *\/\n  state[SAW_SLASH][\"https:\/\/stackoverflow.com\/\"] = SINGLE_COMMENT;\n  state[SAW_SLASH]['*'] = MULTI_COMMENT;\n  state[SAW_SLASH]['\\n'] = TEXT;\n\n  \/**\n   * For all but a few specific characters, if we're in any one of\n   * the SAW_STAR, SINGLE_COMMENT, or MULTI_COMMENT states,\n   * we stay in that state.\n   *\/\n  for ( size_t i = 0; i &lt; ENCODINGS; i++ )\n  {\n    state[SAW_STAR][i] = MULTI_COMMENT;\n    state[SINGLE_COMMENT][i] = SINGLE_COMMENT;\n    state[MULTI_COMMENT][i] = MULTI_COMMENT;\n  }\n\n  \/**\n   * Exceptions to the loop above.\n   *\/\n  state[SAW_STAR][\"https:\/\/stackoverflow.com\/\"] = TEXT;\n  state[SAW_STAR]['*'] = SAW_STAR;\n\n  state[SINGLE_COMMENT]['\\n'] = TEXT;\n  state[MULTI_COMMENT]['*'] = SAW_STAR;\n}\n\n\/**\n * Initialize our action table\n *\/\nvoid initAction( int (*action)[ENCODINGS] )\n{\n  action[TEXT]['\\n'] = INC_TOTAL;\n  action[SAW_STAR][\"https:\/\/stackoverflow.com\/\"] = INC_MULTI;\n  action[MULTI_COMMENT]['\\n'] = INC_MULTI | INC_TOTAL;   \/\/ Multiple actions are bitwise-OR'd\n  action[SINGLE_COMMENT]['\\n'] = INC_SINGLE | INC_TOTAL; \/\/ together\n  action[SAW_SLASH]['\\n'] = INC_TOTAL;\n}\n\n\/**\n * Scan the input file for comments\n *\/\nvoid countComments( FILE *stream, size_t *totalLines, size_t *single, size_t *multi )\n{\n  *totalLines = *single = *multi = 0;\n\n  int c;\n  int curState = TEXT, curAction = NO_ACTION;\n\n  while ( ( c = fgetc( stream ) ) != EOF )\n  {\n    curAction = action[curState][c]; \/\/ Read the action before we overwrite the state\n    curState = state[curState][c];   \/\/ Get the new state (which may be the same as the old state)\n\n    if ( curAction &amp; INC_TOTAL )     \/\/ Execute the action.\n      (*totalLines)++;\n\n    if ( curAction &amp; INC_SINGLE )\n      (*single)++;\n\n    if ( curAction &amp; INC_MULTI )\n      (*multi)++;\n  }\n}\n\n\/**\n * Main function.\n *\/\nint main( int argc, char **argv )\n{\n  \/**\n   * Input sanity check\n   *\/\n  if ( argc &lt; 2 )\n  {\n    fprintf( stderr, \"USAGE: %s &lt;filename&gt;\\n\", argv[0] );\n    exit( EXIT_FAILURE );\n  }\n\n  \/**\n   * Open the input file\n   *\/\n  FILE *fp = fopen( argv[1], \"r\" );\n  if ( !fp )\n  {\n    fprintf( stderr, \"Cannot open file %s\\n\", argv[1] );\n    exit( EXIT_FAILURE );\n  }\n\n  \/**\n   * If input file was successfully opened, initialize our\n   * state and action tables.\n   *\/\n  initState( state );\n  initAction( action );\n\n  size_t totalLines, single, multi;\n\n  \/**\n   * Do the thing.\n   *\/\n  countComments( fp, &amp;totalLines, &amp;single, &amp;multi );\n  fclose( fp );\n\n  printf( \"File                 : %s\\n\", argv[1] );\n  printf( \"Total lines          : %zu\\n\", totalLines );\n  printf( \"Single-comment lines : %zu\\n\", single );\n  printf( \"Multi-comment lines  : %zu\\n\", multi );\n\n  return EXIT_SUCCESS;\n}\n<\/code><\/pre>\n<p>Running the file on itself gives us<\/p>\n<pre><code>$ .\/comment_counter comment_counter.c\nFile                 : comment_counter.c\nTotal lines          : 150\nSingle-comment lines : 7\nMulti-comment lines  : 42\n<\/code><\/pre>\n<p>which I think is right.  This has all the same weaknesses as the first version, just in a different form.  <\/p>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\">5<\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved C Program to count comment lines (\/\/ and \/* *\/) <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] You can write a state machine that should handle most cases. As you scan the file, you&#8217;ll be in one of the following states: TEXT &#8211; regular (non-commented) text; this is the state you&#8217;ll start in. Any newline seen in this state will cause the total-lines counter to be incremented. SAW_SLASH &#8211; You&#8217;ve seen &#8230; <a title=\"[Solved] C Program to count comment lines (\/\/ and \/* *\/)\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/\" aria-label=\"More on [Solved] C Program to count comment lines (\/\/ and \/* *\/)\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[324,379,914,493,1554],"class_list":["post-12718","post","type-post","status-publish","format-standard","hentry","category-solved","tag-c","tag-comments","tag-count","tag-file","tag-line"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] C Program to count comment lines (\/\/ and \/* *\/) - JassWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] C Program to count comment lines (\/\/ and \/* *\/) - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] You can write a state machine that should handle most cases. As you scan the file, you&#8217;ll be in one of the following states: TEXT &#8211; regular (non-commented) text; this is the state you&#8217;ll start in. Any newline seen in this state will cause the total-lines counter to be incremented. SAW_SLASH &#8211; You&#8217;ve seen ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-01T11:02:01+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] C Program to count comment lines (\/\/ and \/* *\/)\",\"datePublished\":\"2022-10-01T11:02:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/\"},\"wordCount\":407,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"c++\",\"comments\",\"count\",\"file\",\"line\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/\",\"name\":\"[Solved] C Program to count comment lines (\/\/ and \/* *\/) - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2022-10-01T11:02:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] C Program to count comment lines (\/\/ and \/* *\/)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] C Program to count comment lines (\/\/ and \/* *\/) - JassWeb","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:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] C Program to count comment lines (\/\/ and \/* *\/) - JassWeb","og_description":"[ad_1] You can write a state machine that should handle most cases. As you scan the file, you&#8217;ll be in one of the following states: TEXT &#8211; regular (non-commented) text; this is the state you&#8217;ll start in. Any newline seen in this state will cause the total-lines counter to be incremented. SAW_SLASH &#8211; You&#8217;ve seen ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/","og_site_name":"JassWeb","article_published_time":"2022-10-01T11:02:01+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] C Program to count comment lines (\/\/ and \/* *\/)","datePublished":"2022-10-01T11:02:01+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/"},"wordCount":407,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["c++","comments","count","file","line"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/","url":"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/","name":"[Solved] C Program to count comment lines (\/\/ and \/* *\/) - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-10-01T11:02:01+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-c-program-to-count-comment-lines-and\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] C Program to count comment lines (\/\/ and \/* *\/)"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/12718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=12718"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/12718\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=12718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=12718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=12718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}