{"id":970,"date":"2023-03-31T00:59:42","date_gmt":"2023-03-30T19:29:42","guid":{"rendered":"https:\/\/jassweb.com\/new22\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem\/"},"modified":"2023-03-31T00:59:42","modified_gmt":"2023-03-30T19:29:42","slug":"solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/","title":{"rendered":"[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem"},"content":{"rendered":"<h2> Introduction <\/h2>\n<p>[ad_1]<\/p>\n<p>If you&#8217;ve been struggling with a document for two days and can&#8217;t seem to get it to work, you&#8217;re not alone. Many people have difficulty understanding the complexities of document formatting and troubleshooting. Fortunately, there are many resources available to help you solve your problem. In this post, we&#8217;ll discuss some tips and tricks to help you get your document squared away. We&#8217;ll also provide some guidance on how to avoid cheating and point out the problem you&#8217;re having. With the right approach, you&#8217;ll be able to get your document squared away in no time.<\/p>\n<h2> Solution<\/h2>\n<p><\/p>\n<p>Without seeing the code it is difficult to pinpoint the exact problem. However, some general tips that may help you troubleshoot the issue include:<\/p>\n<p>1. Check for typos or syntax errors in your code.<br \/>\n2. Make sure you are using the correct data types for the variables you are using.<br \/>\n3. Check that you are using the correct methods and functions for the task you are trying to accomplish.<br \/>\n4. Make sure you are using the correct parameters for the methods and functions you are using.<br \/>\n5. Check that you are using the correct logic for the task you are trying to accomplish.<br \/>\n6. Make sure you are using the correct libraries and packages for the task you are trying to accomplish.<br \/>\n7. Check that you are using the correct file paths for the documents you are trying to access.<br \/>\n8. Make sure you are using the correct version of the software you are using.<br \/>\n9. Check that you are using the correct operating system for the task you are trying to accomplish.<br \/>\n10. Make sure you are using the correct settings for the task you are trying to accomplish. <\/p>\n<p><\/p>\n<div class=\"entry-content\" itemprop=\"text\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-1088640234840270\" crossorigin=\"anonymous\"><\/script><\/p>\n<p><script><\/p>\n<p><\/script><\/p>\n<p>\n<\/p>\n<div id=\"answer-75279720\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"75279720\" data-parentid=\"75273967\" data-score=\"0\" 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<ol>\n<li>When processing regular characters (final else clause) you read additional input instead of operating over <code>text<\/code>, i.e. instead of:<\/li>\n<\/ol>\n<pre><code>                scanf(\"%c\", &amp;document[parano][sentno][wordno][charno]);\n                printf(\"%c\\n\", document[parano][sentno][wordno][charno]);\n                charno++;\n<\/code><\/pre>\n<p>you want to do:<\/p>\n<pre><code>                document[parano][sentno][wordno][charno++] = text[i];\n<\/code><\/pre>\n<p>By the time we hit <code>text[i] == ' '<\/code> for the first time the value of <code>***document<\/code> is \u201c3\\n1 2\\n2\\n\u201d but you wanted it to be \u201cLearning\u201d.<\/p>\n<ol start=\"2\">\n<li>\n<p>(not fixed) When processing a word (`text[i] == \u2018 \u2018) you expand current word, yet, you hard-code 1000 when you allocate it initially so this doesn\u2019t make sense. Be consistent.<\/p>\n<\/li>\n<li>\n<p><code>parano<\/code>, <code>sentno<\/code>, <code>wordno<\/code>, <code>charno<\/code> is indices but same suggest they are counts. It\u2019s not wrong just confusing and why you have to <code>wordno + 2<\/code> when relloc\u2019ing.<\/p>\n<\/li>\n<li>\n<p>Terminate words with `\\0\u2032.<\/p>\n<\/li>\n<li>\n<p>When you process \u2018 \u2018 you add another word which you may or may not need which is fine. But when process a \u2018.\u2019 you look ahead to the following letter is a <code>\\n<\/code> or not. Be consistent. If you look ahead then you need to check that <code>i + 1 &lt; len<\/code>, and it\u2019s fragile, say, there is a stray space before the <code>\\n<\/code>.<\/p>\n<\/li>\n<li>\n<p>(not fixed) Memory leaks. As the size of the sub-elements (paragraph, sentences and words) are private implementation details of <code>get_document()<\/code> you will have refactor the code to make those available. I suggest:<\/p>\n<\/li>\n<\/ol>\n<pre><code>struct document {\n   char ****document;\n   size_t paragraphs;\n   size_t sentences;\n   size_t words;\n}\n<\/code><\/pre>\n<ol start=\"7\">\n<li>\n<p>(not fixed) Deduplicate. Similar to the print functions, create a allocation function per type.<\/p>\n<\/li>\n<li>\n<p>(not fixed, really) <code>get_input_text()<\/code>. You split the into paragraphs then concatenate everything again into a local variable then copy it into a dynamically allocated variable:<\/p>\n<\/li>\n<\/ol>\n<pre><code>   char *str = malloc(BUFFER_LEN);\n   for(size_t i = 0, l = 0; l &lt; lines &amp;&amp; i + 1 &lt; BUFFER_LEN; i += strlen(str + i)) {\n       int rv = fgets(str + i, BUFFER_LEN - i, stdin);\n       if(!rv) {\n          \/\/ handle error\n          break;\n       }\n   }\n   return s;\n<\/code><\/pre>\n<ol start=\"9\">\n<li>(not fixed) Separate i\/o from processing. This simplifies testing and it makes it easier to figure out what is going on. In <code>main(), you read a query type then 1 to 3 numbers. <\/code>scanf()` tells you how many items where read so you simply do. As you don\u2019t use the kth_ functions for anything else just combine then with print_ funci<\/li>\n<\/ol>\n<pre><code>    int n = scanf(\"%d %d %d %d\", &amp;type, &amp;p, &amp;s, &amp;w);\n    switch(type) {\n        case 1:\n            if(n != 2) {\n              \/\/ handle error\n            }\n            print_paragraph(document, p);\n            break;\n        ...\n    }\n<\/code><\/pre>\n<ol start=\"10\">\n<li>\n<p>(not fixed) Add error checks for the remaining<code>malloc()<\/code>, <code>strdup()<\/code> etc.<\/p>\n<\/li>\n<li>\n<p>Don\u2019t hard-code magic values (1000). I introduced the constant <code>WORD_LEN<\/code> but you also have MAX_CHARACTERS which is kinda the same thing.<\/p>\n<\/li>\n<li>\n<p>(not fixed) Consider using <code>char *s = strpbrk(text + i, \" .\\n\")<\/code> to copy a word at a time. It will simplify <code>\\0<\/code> handling, and likely to be faster than walking the <code>text<\/code> a byte at a time, i.e. <code>i += s - text + i<\/code>, just handle the <code>s == NULL<\/code> special case.<\/p>\n<\/li>\n<\/ol>\n<p>valgrind is now happy other than leaks (see above):<\/p>\n<pre><code>#include &lt;assert.h&gt;\n#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n#include &lt;string.h&gt;\n#define MAX_CHARACTERS 1005\n#define MAX_PARAGRAPHS 5\n#define WORD_LEN 1000\n\nchar *kth_word_in_mth_sentence_of_nth_paragraph(char ****document, int p, int s, int w) {\n    return document[p - 1][s - 1][w - 1];\n}\n\nchar **kth_sentence_in_mth_paragraph(char ****document, int p, int s) {\n    return document[p - 1][s - 1];\n}\n\nchar ***kth_paragraph(char ****document, int p) {\n    return document[p - 1];\n}\n\nchar ****get_document(char* text) {\n    char ****document = malloc(sizeof ***document);\n    *document = malloc(sizeof **document);\n    **document = malloc(sizeof *document);\n    ***document = malloc(WORD_LEN);\n\n    \/*  declare some numbers as iterators for the words, sentences,etc.*\/\n    int parano = 0;\n    int sentno = 0;\n    int wordno = 0;\n    int charno = 0;\n    \/*  now iterate over the text filling and expanding the document at the same time*\/\n    \/*----------------------------------------------------------------------------------------------------*\/\n    \/*  feading data in those spaces*\/\n    size_t len = strlen(text);\n    for (size_t i = 0; i &lt; len; i++) {\n        switch(text[i]) {\n            case ' ': {\n                document[parano][sentno][wordno][charno] = '\\0';\n\n                wordno++;\n                char **words = realloc(\n                    document[parano][sentno],\n                    (wordno + 1) * sizeof *document[parano][sentno]\n                );\n                if(!words) {\n                    printf(\"realloc of words failed\\n\");\n                    exit(1);\n                }\n                document[parano][sentno] = words;\n                document[parano][sentno][wordno] = malloc(WORD_LEN);\n                charno = 0;\n                break;\n            }\n            case '.': {\n                document[parano][sentno][wordno][charno] = '\\0';\n\n                sentno++;\n                char ***sentences = realloc(\n                    document[parano],\n                    (sentno + 1) * sizeof *document[parano]\n                );\n                if(!sentences) {\n                    printf(\"realloc of sentences failed\\n\");\n                    exit(1);\n                }\n                document[parano] = sentences;\n                document[parano][sentno] = malloc(sizeof **document);\n                wordno = 0;\n                document[parano][sentno][wordno] = malloc(WORD_LEN);\n                charno = 0;\n                break;\n            }\n            case '\\n': {\n                document[parano][sentno][wordno][charno] = '\\0';\n\n                parano++;\n                char ****paragraphs = realloc(\n                    document,\n                    (parano + 1) * sizeof *document\n                );\n                if(!paragraphs) {\n                    printf(\"realloc of paragraphs failed\\n\");\n                    exit(1);\n                }\n                document = paragraphs;\n                document[parano] = malloc(sizeof ***document);\n                sentno = 0;\n                document[parano][sentno] = malloc(sizeof **document);\n                wordno = 0;\n                document[parano][sentno][wordno] = malloc(WORD_LEN);\n                charno = 0;\n                break;\n            }\n            default: \/\/ character\n                document[parano][sentno][wordno][charno++] = text[i];\n        }\n    }\n    return document;\n}\n\nchar *get_input_text() {\n    int paragraph_count;\n    scanf(\"%d\", &amp;paragraph_count);\n    char p[MAX_PARAGRAPHS][MAX_CHARACTERS];\n    char doc[MAX_CHARACTERS];\n    memset(doc, 0, sizeof doc);\n    getchar();\n    for (int i = 0; i &lt; paragraph_count; i++) {\n        scanf(\"%[^\\n]%*c\", p[i]);\n        strcat(doc, p[i]);\n        if (i != paragraph_count - 1)\n            strcat(doc, \"\\n\");\n    }\n    return strdup(doc);\n}\n\nvoid print_word(char *word) {\n    printf(\"%s\", word);\n}\n\nvoid print_sentence(char **sentence) {\n    int word_count;\n    scanf(\"%d\", &amp;word_count);\n    for(int i = 0; i &lt; word_count; i++){\n        print_word(sentence[i]);\n        if(i + 1 != word_count)\n            printf(\" \");\n    }\n}\n\nvoid print_paragraph(char ***paragraph) {\n    int sentence_count;\n    scanf(\"%d\", &amp;sentence_count);\n    for (int i = 0; i &lt; sentence_count; i++) {\n        print_sentence(paragraph[i]);\n        printf(\".\");\n    }\n}\n\nint main() {\n    char *text = get_input_text();\n    char ****document = get_document(text);\n    int q;\n    scanf(\"%d\", &amp;q);\n    while (q--) {\n        int type;\n        scanf(\"%d\", &amp;type);\n        switch(type) {\n            case 1: {\n                int p;\n                scanf(\"%d\", &amp;p);\n                print_paragraph(kth_paragraph(document, p));\n                break;\n            }\n            case 2: {\n                int p, s;\n                scanf(\"%d %d\", &amp;p, &amp;s);\n                print_sentence(kth_sentence_in_mth_paragraph(document, p, s));\n                break;\n            }\n            case 3: {\n                int p, s, w;\n                scanf(\"%d %d %d\", &amp;p, &amp;s, &amp;w);\n                print_word(kth_word_in_mth_sentence_of_nth_paragraph(document, p, s, w));\n                break;\n            }\n            default:\n                printf(\"error\\n\");\n        }\n        printf(\"\\n\");\n    }\n    free(text);\n}\n<\/code><\/pre>\n<p>Output as expected:<\/p>\n<pre><code>Learning pointers is more fun.It is good to have pointers.\nLearning C is fun\nLearning\n<\/code><\/pre>\n<p>Btw, a whole different way of solving this is problem is keep the original input (<code>text<\/code>) then write functions to directly extract a paragraph, sentence or word from that string. If you input is huge then create an index, say, (<code>paragraph<\/code>, <code>sentence<\/code>, <code>word<\/code>) to <code>&amp;text[i]<\/code>.<\/p>\n<\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p> <span class=\"d-none\" itemprop=\"commentCount\">1<\/span> <\/p>\n<\/div>\n<\/div>\n<p>solved i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem <\/p>\n<p><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-1088640234840270\" crossorigin=\"anonymous\"><\/script><\/p>\n<p><script><\/p>\n<p><\/script> <\/div>\n<p>[ad_2]<\/p>\n<p>Unfortunately, it is difficult to provide a definitive answer without seeing the code you have written. However, there are a few things you can check to help you troubleshoot the issue. <\/p>\n<p>First, make sure you are using the correct HTML tags. Different tags are used for different elements, so it is important to make sure you are using the right ones. Additionally, make sure you are using the correct syntax for the tags. For example, if you are using a <\/p>\n<div> tag, make sure it is properly closed with a <\/div>\n<p> tag. <\/p>\n<p>Second, check for any typos in your code. Typos can cause unexpected results, so it is important to double-check your code for any mistakes. <\/p>\n<p>Finally, make sure you are using the correct attributes for the HTML tags. Different attributes are used for different elements, so it is important to make sure you are using the right ones. <\/p>\n<p>If you are still having trouble, you may want to consider asking for help on a forum or from a professional. Good luck!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction [ad_1] If you&#8217;ve been struggling with a document for two days and can&#8217;t seem to get it to work, you&#8217;re not alone. Many people have difficulty understanding the complexities of document formatting and troubleshooting. Fortunately, there are many resources available to help you solve your problem. In this post, we&#8217;ll discuss some tips and &#8230; <a title=\"[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/\" aria-label=\"More on [Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[324,712,2162],"class_list":["post-970","post","type-post","status-publish","format-standard","hentry","category-solved","tag-c","tag-pointers","tag-realloc"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem - 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-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem - JassWeb\" \/>\n<meta property=\"og:description\" content=\"Introduction [ad_1] If you&#8217;ve been struggling with a document for two days and can&#8217;t seem to get it to work, you&#8217;re not alone. Many people have difficulty understanding the complexities of document formatting and troubleshooting. Fortunately, there are many resources available to help you solve your problem. In this post, we&#8217;ll discuss some tips and ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-30T19:29:42+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=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem\",\"datePublished\":\"2023-03-30T19:29:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/\"},\"wordCount\":909,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"c++\",\"pointers\",\"realloc\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/\",\"name\":\"[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2023-03-30T19:29:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem\"}]},{\"@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=1775193939\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775193939\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem - 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-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem - JassWeb","og_description":"Introduction [ad_1] If you&#8217;ve been struggling with a document for two days and can&#8217;t seem to get it to work, you&#8217;re not alone. Many people have difficulty understanding the complexities of document formatting and troubleshooting. Fortunately, there are many resources available to help you solve your problem. In this post, we&#8217;ll discuss some tips and ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/","og_site_name":"JassWeb","article_published_time":"2023-03-30T19:29:42+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem","datePublished":"2023-03-30T19:29:42+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/"},"wordCount":909,"commentCount":0,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["c++","pointers","realloc"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/","url":"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/","name":"[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2023-03-30T19:29:42+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-i-have-been-on-this-question-for-quaring-the-document-for-two-days-straight-and-it-is-not-working-dont-want-to-cheat-can-you-point-the-problem-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] i have been on this question for quaring the document for two days straight, and it is not working. don\u2019t want to cheat, can you point the problem"}]},{"@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=1775193939","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775193939","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\/970","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=970"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/970\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}