Skip to content

Commit

Permalink
Deployed 11e41cb with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Dec 6, 2023
1 parent dd8593e commit cfff55b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions programming/daily/2023/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1192,9 +1192,6 @@ <h3 id="4-command-line-arguments">「4」 Command Line Arguments<a class="header
<!-- prettier-ignore-start -->
<details class="note">
<summary>Answer</summary>
<div class="admonition note inline end">
<p><a class="glightbox" data-desc-position="bottom" data-height="auto" data-type="image" data-width="100%" href="../graph/23.12.04.png"><img alt="" src="../graph/23.12.04.png"/></a></p>
</div>
<p><code>argv</code> is an array of pointers to strings, and <code>argc</code> is the number of strings in <code>argv</code>. The <code>argv</code> array contains the following strings:</p>
<div class="highlight"><pre><span></span><code>argv[0] = "./a.out"
argv[1] = "this"
Expand All @@ -1204,6 +1201,9 @@ <h3 id="4-command-line-arguments">「4」 Command Line Arguments<a class="header
</code></pre></div>
<p>The <code>argc</code> is 5, because there are 5 strings in <code>argv</code>.</p>
<p>The <code>argv</code> array is terminated by a null pointer, so <code>argv[5]</code> is a null pointer.</p>
<div class="admonition note inline end">
<p><a class="glightbox" data-desc-position="bottom" data-height="auto" data-type="image" data-width="100%" href="../graph/23.12.04.png"><img alt="" src="../graph/23.12.04.png"/></a></p>
</div>
<p>For more information about <code>argv</code> and <code>argc</code>, see <a href="https://en.cppreference.com/w/c/language/main_function">cppreference-argc, argv</a>.</p>
</details>
<!-- prettier-ignore-end -->
Expand Down Expand Up @@ -1431,17 +1431,19 @@ <h3 id="30-basic-doubly-linked-list">「30」 Basic Doubly Linked List<a class="
<!-- prettier-ignore-start -->
<details class="note">
<summary>Answer</summary>
<p><a class="glightbox" data-desc-position="bottom" data-height="auto" data-type="image" data-width="100%" href="../graph/23.11.30.drawio.svg"><img align="right" alt="" src="../graph/23.11.30.drawio.svg"/></a></p>
<ol>
<li><code>list</code></li>
<li><code>list-&gt;next</code></li>
<li><code>node</code></li>
<li><code>node</code></li>
<li><code>list-&gt;next</code></li>
</ol>
<div class="admonition note inline end">
<p><a class="glightbox" data-desc-position="bottom" data-height="auto" data-type="image" data-width="100%" href="../graph/23.11.30.drawio.svg"><img alt="" src="../graph/23.11.30.drawio.svg"/></a></p>
</div>
<p>Notice this is a doubly linked list <strong>with a dummy node</strong>. The dummy node is a special node that does not store any data. It is used to simplify the implementation of the linked list. In this case, the dummy node is <code>list</code>.</p>
<p>The <code>insertFront</code> function inserts a new node with <code>data</code> at the front of the list. The new node is inserted between the dummy node and the first node of the list. The <code>insertFront</code> function takes two steps:</p>
<ol>
<ol start="6">
<li>Create a new node and set its <code>data</code> to <code>data</code>.</li>
<li>Insert the new node between the dummy node and the first node of the list.</li>
</ol>
Expand Down Expand Up @@ -1668,8 +1670,10 @@ <h3 id="24-pointer-array">「24」 Pointer Array<a class="headerlink" href="#24-
<details class="note">
<summary>Answer</summary>
<p>A.</p>
<p><code>a[]</code> is an array of pointers, which stores the addresses of three strings, and <code>pa</code> points to the address of the first element of <code>a</code>, as shown below:</p>
<div class="admonition note inline end">
<p><a class="glightbox" data-desc-position="bottom" data-height="auto" data-type="image" data-width="100%" href="../graph/23.11.24.jpg"><img alt="" src="../graph/23.11.24.jpg"/></a></p>
</div>
<p><code>a[]</code> is an array of pointers, which stores the addresses of three strings, and <code>pa</code> points to the address of the first element of <code>a</code>, as shown below:</p>
<p>Pointer operations take precedence over addition, so <code>*(*pa + 1)</code> equals to <code>n</code>.</p>
<p>In summary, the code fragment prints out <code>none</code>.</p>
</details>
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit cfff55b

Please sign in to comment.