<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Embedded DeepDive]]></title><description><![CDATA[Embedded DeepDive]]></description><link>https://embeddeddeepdive.com</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1722806976464/edde5286-fb4a-4ee2-bbea-eeff60e229b6.jpeg</url><title>Embedded DeepDive</title><link>https://embeddeddeepdive.com</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 12:45:08 GMT</lastBuildDate><atom:link href="https://embeddeddeepdive.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Understanding ans in MATLAB | Episode 1]]></title><description><![CDATA[In MATLAB, ans is a special variable that automatically stores the result of expressions or function calls that are not assigned to any variable. It's a handy feature for quickly checking results or performing calculations on the fly in the Command W...]]></description><link>https://embeddeddeepdive.com/understanding-ans-in-matlab</link><guid isPermaLink="true">https://embeddeddeepdive.com/understanding-ans-in-matlab</guid><category><![CDATA[ans command in matlab]]></category><category><![CDATA[using ans command in matlab]]></category><category><![CDATA[using ans in matlab]]></category><category><![CDATA[ans in matlab]]></category><category><![CDATA[ans]]></category><category><![CDATA[Matlab]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Sun, 03 Mar 2024 10:28:30 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1712850508842/b3192bca-b08a-47e0-8745-5caf9b251af2.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In MATLAB, <code>ans</code> is a special variable that automatically stores the result of expressions or function calls that are not assigned to any variable. It's a handy feature for quickly checking results or performing calculations on the fly in the Command Window. However, its use comes with certain precautions in scripts or functions.</p>
<h4 id="heading-what-is-ans">What is <code>ans</code>?</h4>
<ul>
<li><p><strong>Temporary Storage</strong>: <code>ans</code> acts as a placeholder for results of calculations or function outputs where no explicit variable is defined.</p>
</li>
<li><p><strong>Workspace-Specific</strong>: <code>ans</code> is specific to the workspace it's used in. MATLAB maintains separate instances of <code>ans</code> for the base workspace and each function workspace.</p>
</li>
</ul>
<h4 id="heading-why-caution-is-advised">Why Caution is Advised</h4>
<ul>
<li><p><strong>Changeability</strong>: The value of <code>ans</code> can change with each operation that produces an output without an explicit assignment, making it unreliable for storing the results you wish to keep.</p>
</li>
<li><p><strong>Readability</strong>: Using <code>ans</code> in scripts or functions can make your code harder to read and understand, especially for others reviewing your work.</p>
</li>
</ul>
<h3 id="heading-examples-and-best-practices"><strong>Examples and Best Practices</strong></h3>
<h4 id="heading-example-1-simple-calculation">Example 1: Simple Calculation</h4>
<pre><code class="lang-basic">% Performing a calculation without assigning the result <span class="hljs-keyword">to</span> a variable.
<span class="hljs-symbol">2 </span>+ <span class="hljs-number">2</span>

% MATLAB stores the result in `ans`.

% Output: ans = <span class="hljs-number">4</span>
</code></pre>
<h4 id="heading-example-2-using-ans-for-further-calculations">Example 2: Using <code>ans</code> for Further Calculations</h4>
<pre><code class="lang-basic">% After the above operation, `ans` is <span class="hljs-number">4.</span>
% You can use `ans` in another calculation.

ans * <span class="hljs-number">2</span>

% Output: ans = <span class="hljs-number">8</span>
</code></pre>
<p><strong>Note</strong>: While this demonstrates <code>ans</code>'s utility, it's better practice to assign results to descriptive variables.</p>
<h4 id="heading-example-3-assigning-results-to-variables">Example 3: Assigning Results to Variables</h4>
<pre><code class="lang-basic">% A better approach: assigning the result <span class="hljs-keyword">to</span> a variable.

result = <span class="hljs-number">4</span> + <span class="hljs-number">4</span>

% Output: result = <span class="hljs-number">8</span>
</code></pre>
<p>After this operation, <code>result</code> holds the value <code>8</code>, and <code>ans</code> remains unchanged from its last assignment unless another unassigned calculation or function call is made.</p>
<h4 id="heading-example-4-call-a-function-that-returns-output">Example 4: <strong>Call a Function That Returns Output</strong></h4>
<pre><code class="lang-basic">function a = outputFunc()
    a = <span class="hljs-number">100</span>;
<span class="hljs-keyword">end</span>

% <span class="hljs-keyword">call</span> <span class="hljs-comment">'outputFunc' in MATLAB</span>
</code></pre>
<p>Call 'outputFunc ' in MATLAB will store the returned result in the '<code>ans</code>' if an output variable is not specified to save the result of a function.</p>
<p><code>outputFunc</code></p>
<p>after calling 'outputFunc' the '<code>ans</code>' will have a value of 100.</p>
<pre><code class="lang-basic">% Performing a calculation without assigning the result <span class="hljs-keyword">to</span> a variable.
<span class="hljs-symbol">2 </span>+ <span class="hljs-number">2</span>
</code></pre>
<p>MATLAB will store the above result in the <code>ans</code> and after calling 'outputFunc' with an output variable assignment:</p>
<p><code>saveResult = outputFunc</code></p>
<p>the '<code>saveResult</code>' variable will have a value of 100 and <code>ans</code> will still be holding a value of 4.</p>
<h4 id="heading-example-5-using-ans-within-the-function">Example 5: <strong>Using</strong> <code>ans</code> within the function</h4>
<pre><code class="lang-basic">function result = useAnsExample()
    <span class="hljs-number">2</span> + <span class="hljs-number">2</span>; % This operation<span class="hljs-comment">'s result is not assigned to a variable</span>
    result = ans * <span class="hljs-number">10</span>; % ans now holds the value <span class="hljs-number">4</span> from the previous operation
<span class="hljs-keyword">end</span>
</code></pre>
<h4 id="heading-best-practices">Best Practices</h4>
<ol>
<li><p><strong>Use Descriptive Variable Names</strong>: Instead of relying on <code>ans</code> for storing results, assign outputs to variables with meaningful names.</p>
</li>
<li><p><strong>Limit</strong><code>ans</code> Usage to Interactive Exploration: <code>ans</code> is most useful for quick calculations in the Command Window, not in scripts or functions.</p>
</li>
<li><p><strong>Maintain Readability</strong>: For clearer, more maintainable code, avoid using <code>ans</code> in your scripts or functions. Directly assign outputs to well-named variables.</p>
</li>
</ol>
<h2 id="heading-youtube-tutorial"><strong>Youtube Tutorial</strong></h2>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.youtube.com/watch?v=W7GB99B1IDQ">https://www.youtube.com/watch?v=W7GB99B1IDQ</a></div>
<p> </p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>While <code>ans</code> is a convenient feature in MATLAB for quick calculations and checks, understanding its behavior and limitations is crucial for effective and clear MATLAB programming. By following best practices and using <code>ans</code> judiciously, you can enhance the readability and reliability of your code.</p>
]]></content:encoded></item><item><title><![CDATA[toupper() function in C]]></title><description><![CDATA[Using the toupper() function in C
The toupper() function in C is used to convert a lowercase character to its uppercase counterpart. For example, the toupper() function would convert the character 'a' to 'A'.
The toupper() function takes a character ...]]></description><link>https://embeddeddeepdive.com/toupper-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/toupper-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[ #toupper]]></category><category><![CDATA[C]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Feb 2024 19:21:48 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708543268443/dec2ddde-5844-4bc9-afb1-e54c46d17531.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-toupper-function-in-c">Using the <code>toupper()</code> function in C</h2>
<p>The <code>toupper()</code> function in C is used to convert a lowercase character to its uppercase counterpart. For example, the <code>toupper()</code> function would convert the character <code>'a'</code> to <code>'A'</code>.</p>
<p>The <code>toupper()</code> function takes a character as input and returns the converted character.</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">'a'</span>;
    <span class="hljs-keyword">char</span> upper_c = <span class="hljs-built_in">toupper</span>(c);
    <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The uppercase version of '%c' is '%c'.\n"</span>, c, upper_c);

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>Converts lowercase letters to uppercase. Returns the uppercase equivalent to letters, if such value exists, else letters remains unchanged. The character’s value must be representable as an unsigned char or the value of EOF.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[isxdigit() function in C]]></title><description><![CDATA[Using the isxdigit() function in C
The isxdigit() function in C is used to check whether a character is a hexadecimal digit (0-9,a-f,A-F). The function takes a character as input and returns a non-zero value if the character is a hexadecimal digit, o...]]></description><link>https://embeddeddeepdive.com/isxdigit-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/isxdigit-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[ #isxdigit]]></category><category><![CDATA[C]]></category><category><![CDATA[ctype]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Feb 2024 19:12:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708542689837/6f2a71d2-f3d6-4f96-9f20-8fa9797299c7.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-isxdigit-function-in-c">Using the <code>isxdigit()</code> function in C</h2>
<p>The <code>isxdigit()</code> function in C is used to check whether a character is a hexadecimal digit (<strong>0-9,a-f,A-F</strong>). The function takes a character as input and returns a non-zero value if the character is a hexadecimal digit, or zero if the character is not a hexadecimal digit.</p>
<p>Here is an example of how to use the <code>isxdigit()</code> function:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">'a'</span>;

    <span class="hljs-keyword">int32_t</span> result = <span class="hljs-built_in">isxdigit</span>(c);

    <span class="hljs-keyword">if</span> (result &gt; <span class="hljs-number">0x00</span>)
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is a hexadecimal digit.\n"</span>, c);
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is not a hexadecimal digit.\n"</span>, c);
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>The <code>isxdigit()</code> function takes a character as input and returns a non-zero value if the character is a hexadecimal digit, or zero if the character is not a hexadecimal digit. In this example, the character <code>'a'</code> is a hexadecimal digit, so the function will return non-zero and the <code>printf()</code> statement will print the output.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[isspace() function in C]]></title><description><![CDATA[Using the isspace() function in C
The isspace() function in C is used to check whether a character is a space. The function takes a character as input and returns a non-zero value if the character is a space, or zero if the character is not a space.
...]]></description><link>https://embeddeddeepdive.com/isspace-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/isspace-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[#isspace ]]></category><category><![CDATA[C]]></category><category><![CDATA[ctype]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Feb 2024 19:05:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708542258695/3e561ac2-6f55-4bb7-99a3-400ecdb99806.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-isspace-function-in-c">Using the <code>isspace()</code> function in C</h2>
<p>The <code>isspace()</code> function in C is used to check whether a character is a space. The function takes a character as input and returns a non-zero value if the character is a space, or zero if the character is not a space.</p>
<p>Here is an example of how to use the <code>isspace()</code> function:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">' '</span>;

    <span class="hljs-keyword">int32_t</span> result = <span class="hljs-built_in">isspace</span>(c);

    <span class="hljs-keyword">if</span> (result &gt; <span class="hljs-number">0x00</span>)
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is a space.\n"</span>, c);
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is not a space.\n"</span>, c);
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>The <code>isspace()</code> function takes a character as input and returns a non-zero value if the character is a space, or zero if the character is not a space. In this example, the character <code>' '</code> is a space, so the function will return a non-zero value and the <code>printf()</code> statement will print the output.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[C library <ctype.h> header functions]]></title><description><![CDATA[The <ctype.h> header file in the C programming language provides several functions to test and manipulate characters. Here are some of the most commonly used functions that are present in C Library ctype_h file:
Exploring ctype library functions




...]]></description><link>https://embeddeddeepdive.com/c-library-ctypeh-header-functions</link><guid isPermaLink="true">https://embeddeddeepdive.com/c-library-ctypeh-header-functions</guid><category><![CDATA[c programming]]></category><category><![CDATA[#isdigit]]></category><category><![CDATA[C]]></category><category><![CDATA[ #isalnum]]></category><category><![CDATA[ #isalpha]]></category><category><![CDATA[ #iscntrl]]></category><category><![CDATA[ #isgraph]]></category><category><![CDATA[ #islower]]></category><category><![CDATA[ #isprint]]></category><category><![CDATA[ #ispunct]]></category><category><![CDATA[#isspace ]]></category><category><![CDATA[ #isupper]]></category><category><![CDATA[ #isxdigit]]></category><category><![CDATA[ #tolower]]></category><category><![CDATA[ #toupper]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Thu, 22 Jun 2023 11:38:09 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708543419441/48206bd1-68b5-420e-a78b-761c5ef9f857.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The <code>&lt;ctype.h&gt;</code> header file in the C programming language provides several functions to test and manipulate characters. Here are some of the most commonly used functions that are present in C Library ctype_h file:</p>
<h2 id="heading-exploring-ctype-library-functions"><strong>Exploring ctype library functions</strong></h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Functions</strong></td><td><strong>Description</strong></td></tr>
</thead>
<tbody>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/isalpha-function-in-c"><strong>isalpha()</strong></a></td><td>Checks if the passed character is alphabetic. Returns a non-zero value if c is an alphabet, else returns 0.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/isdigit-function-in-c"><strong>isdigit()</strong></a></td><td>Checks if the passed character is a digit. Returns a non-zero value if c is a digit, else returns 0.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/isalnum-function-in-c"><strong>isalnum()</strong></a></td><td>Checks if the passed character is alphanumeric. Returns non-zero value if c is an alphanumeric character, else returns 0.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/isspace-function-in-c"><strong>isspace()</strong></a></td><td>Checks if the passed character is white-space. Returns a non-zero value if c is a white-space character, else returns 0.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/islower-function-in-c"><strong>islower()</strong></a></td><td>Checks if the passed character is lowercase. Returns a non-zero value if c is a lowercase character, else returns 0.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/isupper-function-in-c"><strong>isupper()</strong></a></td><td>Checks if the passed character is uppercase. Returns non-zero value if c is an uppercase character, else returns 0.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/isxdigit-function-in-c/"><strong>isxdigit()</strong></a></td><td>Checks if the passed character is a hexadecimal digit. Returns non-zero value if c is a hexadecimal digit, else returns 0.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/iscntrl-function-in-c/"><strong>iscntrl()</strong></a></td><td>Checks if the passed character is a control character. Returns a non-zero value if c is a control character, else returns 0.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/isprint-function-in-c/"><strong>isprint()</strong></a></td><td>Checks if the passed character is printable. Returns a non-zero value if c is a printable character, else returns 0.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/ispunct-function-in-c/"><strong>ispunct()</strong></a></td><td>Checks if the passed character is punctuation. Returns non-zero value if c is a punctuation character, else returns 0.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/isgraph-function-in-c/"><strong>isgraph()</strong></a></td><td>Checks if the passed character has a graphical representation using locale. Returns a non-zero value if c has a graphical representation, else returns 0.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/toupper-function-in-c/"><strong>toupper()</strong></a></td><td>Converts lowercase letters to uppercase. Returns the uppercase equivalent to letters, if such value exists, else letters remain unchanged. The character’s value must be representable as an unsigned char or the value of EOF.</td></tr>
<tr>
<td><a target="_blank" href="https://syntaxspace.com/tolower-function-in-c/"><strong>tolower()</strong></a></td><td>Converts uppercase letters to lowercase. Returns the lowercase equivalent to the letters, if such value exists, else letters remain unchanged. The character’s value must be representable as an unsigned char or the value of EOF.</td></tr>
</tbody>
</table>
</div>]]></content:encoded></item><item><title><![CDATA[tolower() function in C]]></title><description><![CDATA[Using the tolower() function in C
The tolower() function in C is used to convert an uppercase character to its lowercase counterpart. For example, the tolower() the function would convert the character 'A' to 'a'.
The tolower() function takes a chara...]]></description><link>https://embeddeddeepdive.com/tolower-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/tolower-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[ #tolower]]></category><category><![CDATA[C]]></category><category><![CDATA[ctype]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Jun 2023 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708541058741/83810407-3334-4c0c-88e2-58199ecd7ee0.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-tolower-function-in-c">Using the <code>tolower()</code> function in C</h2>
<p>The <code>tolower()</code> function in C is used to convert an uppercase character to its lowercase counterpart. For example, the <code>tolower()</code> the function would convert the character <code>'A'</code> to <code>'a'</code>.</p>
<p>The <code>tolower()</code> function takes a character as input and returns the converted character.</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">'A'</span>;
    <span class="hljs-keyword">char</span> lower_c = <span class="hljs-built_in">tolower</span>(c);
    <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The lowercase version of '%c' is '%c'.\n"</span>, c, lower_c);

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>Converts uppercase letters to lowercase. Returns the lowercase equivalent to the letters, if such value exists, else letters remain unchanged. The character’s value must be representable as an unsigned char or the value of EOF.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[isalpha() function in C]]></title><description><![CDATA[Using the isaplha() function in C
The isalpha() function in C is used to check whether a character is alphabetic. The function takes a character as input and returns a non-zero value if the character is alphabetic, or zero if the character is not alp...]]></description><link>https://embeddeddeepdive.com/isalpha-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/isalpha-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[ #isalpha]]></category><category><![CDATA[C]]></category><category><![CDATA[ctype]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Jun 2023 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708541509766/fa04df38-c89f-4518-896a-845668e48653.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-isaplha-function-in-c">Using the <code>isaplha()</code> function in C</h2>
<p>The <code>isalpha()</code> function in C is used to check whether a character is alphabetic. The function takes a character as input and returns a non-zero value if the character is alphabetic, or zero if the character is not alphabetic.</p>
<p>Here is an example of how to use the <code>isalpha()</code> function:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">'a'</span>;

    <span class="hljs-keyword">int32_t</span> result = <span class="hljs-built_in">isalpha</span>(c);

    <span class="hljs-keyword">if</span> (result &gt; <span class="hljs-number">0x00</span>)
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is an alphabet.\n"</span>, c);
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is not an alphabet.\n"</span>, c);
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>The <code>isalpha()</code> function takes a character as input and returns a non-zero value if the character is alphabetic, or zero if the character is not alphabetic. In this example, the character <code>'a'</code> is alphabetic, so the function will return a non-zero value and the <code>printf()</code> statement will print the output.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[isdigit() function in C]]></title><description><![CDATA[Using the isdigit() function in C
The isdigit() function in C is used to check whether a character is a digit (0 to 9). The function takes a character as input and returns a non-zero value if the character is a digit, or zero if the character is not ...]]></description><link>https://embeddeddeepdive.com/isdigit-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/isdigit-function-in-c</guid><category><![CDATA[#ctypeheader]]></category><category><![CDATA[#isdigit]]></category><category><![CDATA[#programmingtips]]></category><category><![CDATA[c programming]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[C]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Jun 2023 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708541778796/be3087c6-d941-4db0-842c-56e756c9c323.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-isdigit-function-in-c">Using the <code>isdigit()</code> function in C</h2>
<p>The <code>isdigit()</code> function in C is used to check whether a character is a digit (0 to 9). The function takes a character as input and returns a non-zero value if the character is a digit, or zero if the character is not a digit.</p>
<p>Here is an example of how to use the <code>isdigit()</code> function:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">'0'</span>;

    <span class="hljs-keyword">int32_t</span> result = <span class="hljs-built_in">isdigit</span>(c);

    <span class="hljs-keyword">if</span> (result &gt; <span class="hljs-number">0x00</span>)
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is a digit.\n"</span>, c);
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is not a digit.\n"</span>, c);
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>The <code>isdigit()</code> function takes a character as input and returns a non-zero value if the character is a digit, or zero if the character is not a digit. In this example, the character <code>'0'</code> is a digit, so the function will return a non-zero value and the <code>printf()</code> statement will print the output.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[isalnum() function in C]]></title><description><![CDATA[Using the isalnum() function in C
The isalnum() function in C is used to check whether a character is alphanumeric. The function takes a character as input and returns a non-zero value if the character is alphanumeric, or zero if the character is not...]]></description><link>https://embeddeddeepdive.com/isalnum-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/isalnum-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[ #isalnum]]></category><category><![CDATA[C]]></category><category><![CDATA[ctype]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Jun 2023 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708542063331/10cd3880-04a4-4a1b-8408-e9e955f901af.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-isalnum-function-in-c">Using the <code>isalnum()</code> function in C</h2>
<p>The <code>isalnum()</code> function in C is used to check whether a character is alphanumeric. The function takes a character as input and returns a non-zero value if the character is alphanumeric, or zero if the character is not alphanumeric.</p>
<p>Here is an example of how to use the <code>isalnum()</code> function:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">'a'</span>;

    <span class="hljs-keyword">int32_t</span> result = <span class="hljs-built_in">isalnum</span>(c);

    <span class="hljs-keyword">if</span> (result &gt; <span class="hljs-number">0x00</span>)
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is alphanumeric.\n"</span>, c);
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is not alphanumeric.\n"</span>, c);
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>The <code>isalnum()</code> function takes a character as input and returns a non-zero value if the character is alphanumeric, or zero if the character is not alphanumeric. In this example, the character <code>'a'</code> is alphanumeric, so the function will return a non-zero value and the <code>printf()</code> statement will print the output.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[islower() function in C]]></title><description><![CDATA[Using the islower() function in C
The islower() function in C is used to check whether a character is lowercase. The function takes a character as input and returns a non-zero value if the character is lowercase, or zero if the character is not lower...]]></description><link>https://embeddeddeepdive.com/islower-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/islower-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[ #islower]]></category><category><![CDATA[C]]></category><category><![CDATA[ctype]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Jun 2023 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708542467341/8b4897e2-ac0a-4957-978a-e6514c837c99.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-islower-function-in-c">Using the <code>islower()</code> function in C</h2>
<p>The <code>islower()</code> function in C is used to check whether a character is lowercase. The function takes a character as input and returns a non-zero value if the character is lowercase, or zero if the character is not lowercase.</p>
<p>Here is an example of how to use the <code>islower()</code> function:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">'a'</span>;

    <span class="hljs-keyword">int32_t</span> result = <span class="hljs-built_in">islower</span>(c);

    <span class="hljs-keyword">if</span> (result &gt; <span class="hljs-number">0x00</span>)
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is a lowercase.\n"</span>, c);
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is not a lowercase.\n"</span>, c);
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>The <code>islower()</code> function takes a character as input and returns a non-zero value if the character is lowercase, or zero if the character is not lowercase. In this example, the character <code>'a'</code> is lowercase, so the function will return a non-zero value and the <code>printf()</code> statement will print the output.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[isupper() function in C]]></title><description><![CDATA[Using the isupper() function in C
The isupper() function in C is used to check whether a character is uppercase. The function takes a character as input and returns a non-zero value if the character is uppercase, or zero if the character is not upper...]]></description><link>https://embeddeddeepdive.com/isupper-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/isupper-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[ #isupper]]></category><category><![CDATA[C]]></category><category><![CDATA[ctype]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Jun 2023 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708542573869/945ce287-72e8-46ca-9889-f4a16d394535.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-isupper-function-in-c">Using the <code>isupper()</code> function in C</h2>
<p>The <code>isupper()</code> function in C is used to check whether a character is uppercase. The function takes a character as input and returns a non-zero value if the character is uppercase, or zero if the character is not uppercase.</p>
<p>Here is an example of how to use the <code>isupper()</code> function:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">'A'</span>;

    <span class="hljs-keyword">int32_t</span> result = <span class="hljs-built_in">isupper</span>(c);

    <span class="hljs-keyword">if</span> (result &gt; <span class="hljs-number">0x00</span>)
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is a uppercase.\n"</span>, c);
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is not a uppercase.\n"</span>, c);
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>The <code>isupper()</code> function takes a character as input and returns a non-zero value if the character is uppercase, or zero if the character is not uppercase. In this example, the character <code>'A'</code> is uppercase, so the function will return a non-zero value and the <code>printf()</code> statement will print the output.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[iscntrl() function in C]]></title><description><![CDATA[Using the iscntrl() function in C
The iscntrl() function in C is used to check whether a character is a control character. The function takes a character as input and returns a non-zero value if the character is a control character, or zero if the ch...]]></description><link>https://embeddeddeepdive.com/iscntrl-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/iscntrl-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[ #iscntrl]]></category><category><![CDATA[C]]></category><category><![CDATA[ctype]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Jun 2023 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708542803943/9b94084d-6e3e-461b-a3d6-3b1cd6f53216.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-iscntrl-function-in-c">Using the <code>iscntrl()</code> function in C</h2>
<p>The <code>iscntrl()</code> function in C is used to check whether a character is a control character. The function takes a character as input and returns a non-zero value if the character is a control character, or zero if the character is not a control character.</p>
<p>Here is an example of how to use the <code>iscntrl()</code> function:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">'\n'</span>;

    <span class="hljs-keyword">int32_t</span> result = <span class="hljs-built_in">iscntrl</span>(c);

    <span class="hljs-keyword">if</span> (result &gt; <span class="hljs-number">0x00</span>)
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character is a control digit.\n"</span>);
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character is not a control digit.\n"</span>);
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>The <code>iscntrl()</code> function takes a character as input and returns a non-zero value if the character is a control character, or zero if the character is not a control character. In this example, the character <code>'\n'</code> is a control character, so the function will return a non-zero value and the <code>printf()</code> statement will print the output.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[isprint() function in C]]></title><description><![CDATA[Using the isprint() function in C
The isprint() function in C is used to check whether a character is printable (it’s not a control character) . The function takes a character as input and returns a non-zero value if the character is printable, or ze...]]></description><link>https://embeddeddeepdive.com/isprint-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/isprint-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[ #isprint]]></category><category><![CDATA[C]]></category><category><![CDATA[ctype]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Jun 2023 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708543001110/8a4b22d5-d9d1-43d7-a376-fb37f796b411.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-isprint-function-in-c">Using the <code>isprint()</code> function in C</h2>
<p>The <code>isprint()</code> function in C is used to check whether a character is printable (it’s not a control character) . The function takes a character as input and returns a non-zero value if the character is printable, or zero if the character is not printable.</p>
<p>Here is an example of how to use the <code>isprint()</code> function:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">'a'</span>;

    <span class="hljs-keyword">int32_t</span> result = <span class="hljs-built_in">isprint</span>(c);

    <span class="hljs-keyword">if</span> (result &gt; <span class="hljs-number">0x00</span>)
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is printable.\n"</span>, c);
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is not printable.\n"</span>, c);
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>The <code>isprint()</code> function takes a character as input and returns a non-zero value if the character is printable, or zero if the character is not printable. In this example, the character <code>' '</code> is printable, so the function will return a non-zero value and the <code>printf()</code> statement will print the output.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[ispunct() function in C]]></title><description><![CDATA[Using the ispunct() function in C
The ispunct() function in C is used to check whether a character is a punctuation character. The function takes a character as input and returns a non-zero value if the character is a punctuation character, or zero i...]]></description><link>https://embeddeddeepdive.com/ispunct-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/ispunct-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[ #ispunct]]></category><category><![CDATA[C]]></category><category><![CDATA[ctype]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Jun 2023 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708543090440/8223c3a3-a52a-4477-b058-7827ee7c2d2a.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-ispunct-function-in-c">Using the <code>ispunct()</code> function in C</h2>
<p>The <code>ispunct()</code> function in C is used to check whether a character is a punctuation character. The function takes a character as input and returns a non-zero value if the character is a punctuation character, or zero if the character is not a punctuation character.</p>
<p>A punctuation character is a character that is used to separate words or clauses in a sentence. Some examples of punctuation characters are:</p>
<ul>
<li><p>Period (.)</p>
</li>
<li><p>Comma (,)</p>
</li>
<li><p>Question mark (?)</p>
</li>
<li><p>Exclamation point (!)</p>
</li>
<li><p>Apostrophe (‘)</p>
</li>
<li><p>Quotation mark (” or ‘)</p>
</li>
<li><p>Hyphen (-)</p>
</li>
<li><p>Dash (-)</p>
</li>
<li><p>Slash (/)</p>
</li>
<li><p>Backslash ()</p>
</li>
</ul>
<p>Here is an example of how to use the <code>ispunct()</code> function:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">','</span>;

    <span class="hljs-keyword">int32_t</span> result = <span class="hljs-built_in">ispunct</span>(c);

    <span class="hljs-keyword">if</span> (result &gt; <span class="hljs-number">0x00</span>)
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is a punctuation character.\n"</span>, c);
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is not a punctuation character.\n"</span>, c);
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>The <code>ispunct()</code> function takes a character as input and returns a non-zero value if the character is a punctuation character, or zero if the character is not a punctuation character. In this example, the character <code>'.'</code> is a punctuation character, so the function will return a non-zero value and the <code>printf()</code> statement will print the output.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[isgraph() function in C]]></title><description><![CDATA[Using the isgraph() function in C
The isgraph() function in C is used to check whether a character is a graphical character. The function takes a character as input and returns a non-zero value if the character is a graphical character, or zero if th...]]></description><link>https://embeddeddeepdive.com/isgraph-function-in-c</link><guid isPermaLink="true">https://embeddeddeepdive.com/isgraph-function-in-c</guid><category><![CDATA[c programming]]></category><category><![CDATA[#ctypeheader]]></category><category><![CDATA[DailyLearning]]></category><category><![CDATA[programming languages]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[ #isgraph]]></category><category><![CDATA[C]]></category><category><![CDATA[ctype]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 21 Jun 2023 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708543186535/437e0edc-97b9-4b48-a6aa-f5ca5be0398f.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-using-the-isgraph-function-in-c">Using the <code>isgraph()</code> function in C</h2>
<p>The <code>isgraph()</code> function in C is used to check whether a character is a graphical character. The function takes a character as input and returns a non-zero value if the character is a graphical character, or zero if the character is not a graphical character.</p>
<p>A graphical character is a character that can be displayed on a screen. Some examples of graphical characters are:</p>
<ul>
<li><p>Letters (a-z, A-Z)</p>
</li>
<li><p>Numbers (0-9)</p>
</li>
<li><p>Punctuation characters (see above)</p>
</li>
<li><p>Symbols (such as @, #, $, %, etc.)</p>
</li>
</ul>
<p>Here is an example of how to use the <code>isgraph()</code> function:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdint.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;ctype.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int32_t</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">int32_t</span> argc, <span class="hljs-keyword">char</span> <span class="hljs-keyword">const</span> *argv[])</span>
</span>{
    <span class="hljs-keyword">char</span> c = <span class="hljs-string">'a'</span>;

    <span class="hljs-keyword">int32_t</span> result = <span class="hljs-built_in">isgraph</span>(c);

    <span class="hljs-keyword">if</span> (result &gt; <span class="hljs-number">0x00</span>)
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is a graphical character.\n"</span>, c);
    }
    <span class="hljs-keyword">else</span>
    {
        <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The character '%c' is not a graphical character.\n"</span>, c);
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<p>The <code>isgraph()</code> function takes a character as input and returns a non-zero value if the character is a graphical character, or zero if the character is not a graphical character. In this example, the character <code>'a'</code> is a graphical character, so the function will return a non-zero value and the <code>printf()</code> statement will print the output.</p>
<p>Explore the complete list of functions available in <a target="_blank" href="https://syntaxspace.com/c-library-ctype_h-functions">ctype header in C standard library</a>.</p>
]]></content:encoded></item><item><title><![CDATA[Finding installed directory location of Python and pip using Command Prompt | Python and Command Prompt Series]]></title><description><![CDATA[Experience the full article 📖
Find installation directory of python and pip using Command Prompt | Python and Command Prompt Series » SyntaxSpace]]></description><link>https://embeddeddeepdive.com/finding-installed-directory-location-of-python-and-pip-using-command-prompt-python-and-command-prompt-series</link><guid isPermaLink="true">https://embeddeddeepdive.com/finding-installed-directory-location-of-python-and-pip-using-command-prompt-python-and-command-prompt-series</guid><category><![CDATA[Command prompt]]></category><category><![CDATA[Python]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 31 May 2023 11:41:18 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1688295765198/4a39013b-97c3-4314-94e2-bc12b8432012.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-experience-the-full-article"><strong>Experience the full article 📖</strong></h3>
<p><a target="_blank" href="https://syntaxspace.com/find-installed-directory-location-of-python-and-pip-using-command-prompt/">Find installation directory of python and pip using Command Prompt | Python and Command Prompt Series » SyntaxSpace</a></p>
]]></content:encoded></item><item><title><![CDATA[Inline Functions in C | C Series]]></title><description><![CDATA[In this tutorial, we will learn about using inline functions in C. It is a compiler optimization technique that can improve the performance of code by avoiding the overhead of "function call and return" .....
Experience the Full Article 📖
Inline Fun...]]></description><link>https://embeddeddeepdive.com/inline-functions-in-c-c-series</link><guid isPermaLink="true">https://embeddeddeepdive.com/inline-functions-in-c-c-series</guid><category><![CDATA[#cprogramming, #inlinefunctioninc #PerformanceOptimization, #InlineFunctions, C]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Wed, 31 May 2023 11:33:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1688297262795/37200dc8-e02d-4268-bc86-8cbb50bdaaa7.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this tutorial, we will learn about using inline functions in C. It is a compiler optimization technique that can improve the performance of code by avoiding the <strong>overhead</strong> of "<strong>function call</strong> and <strong>return"</strong> .....</p>
<h2 id="heading-experience-the-full-article"><strong>Experience the Full Article 📖</strong></h2>
<p><a target="_blank" href="https://syntaxspace.com/inline-functions-in-c/">Inline Functions in C | C Series » SyntaxSpace</a></p>
]]></content:encoded></item><item><title><![CDATA[MACROS in C | In-Depth Guide | C Series]]></title><description><![CDATA[Macros in C are essentially textual substitutions that occur during the preprocessing phase before the actual compilation. From defining constants to creating function aliases, macros empower you with unparalleled flexibility and code efficiency. Emb...]]></description><link>https://embeddeddeepdive.com/macros-in-c-in-depth-guide-c-series</link><guid isPermaLink="true">https://embeddeddeepdive.com/macros-in-c-in-depth-guide-c-series</guid><category><![CDATA[#CodeReuse, #cprogramming, #Efficiency, #Macros, C]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Mon, 29 May 2023 11:26:05 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1688298034734/61b822b4-94ee-475a-9945-a9586cdd98b4.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Macros in C are essentially <strong>textual substitutions</strong> that occur during the preprocessing phase before the actual compilation. From defining constants to creating function aliases, macros empower you with unparalleled flexibility and code efficiency. Embark on a journey of discovery with multiple expressions, multiline macros, and advanced techniques like string expansion .....</p>
<h2 id="heading-experience-the-full-article"><strong>Experience the Full Article 📖</strong></h2>
<p><a target="_blank" href="https://syntaxspace.com/macros-in-c/">MACROs in C | In-Depth Guide | C Series » SyntaxSpace</a></p>
]]></content:encoded></item><item><title><![CDATA[A Quick Introduction to Smart Pointers in C-plus-plus | C++ Series]]></title><description><![CDATA[Smart pointers in C++ provide a more controlled and automated way of managing memory compared to raw pointers. They help prevent memory leaks by ensuring that the associated objects are deallocated appropriately and help avoid accessing invalid memor...]]></description><link>https://embeddeddeepdive.com/a-quick-introduction-to-smart-pointers-in-c-plus-plus-c-series</link><guid isPermaLink="true">https://embeddeddeepdive.com/a-quick-introduction-to-smart-pointers-in-c-plus-plus-c-series</guid><category><![CDATA[#CodeSafety, #cplusplus, #MemoryManagement, #SmartPointers, C++]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Sun, 28 May 2023 11:23:24 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1688296944437/343008d3-00f7-48e3-8825-5154799e00ca.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Smart pointers in C++ provide a more controlled and automated way of managing memory compared to raw pointers. They help prevent memory leaks by ensuring that the associated objects are deallocated appropriately and help avoid accessing invalid memory after an object has been deleted ........</p>
<h3 id="heading-experience-the-full-article"><strong>Experience the full article 📖</strong></h3>
<p><a target="_blank" href="https://syntaxspace.com/a-quick-introduction-to-smart-pointers-in-c-plus-plus/">A Quick Introduction to Smart Pointers in C-plus-plus | C++ Series » SyntaxSpace</a></p>
]]></content:encoded></item><item><title><![CDATA[Download and install MATLAB runtime package | MATLAB]]></title><description><![CDATA[In this tutorial, we will learn how to download and install MATLAB runtime package. MATLAB runtime allows to run compiled MATLAB applications or components without having MATLAB installed on a target machine.
Usage of MATLAB runtime
MATLAB runtime en...]]></description><link>https://embeddeddeepdive.com/download-and-install-matlab-runtime-package-matlab</link><guid isPermaLink="true">https://embeddeddeepdive.com/download-and-install-matlab-runtime-package-matlab</guid><category><![CDATA[MATLAB runtime installation]]></category><category><![CDATA[MATLAB Runtime]]></category><category><![CDATA[Matlab]]></category><dc:creator><![CDATA[Embedded DeepDive]]></dc:creator><pubDate>Thu, 08 Sep 2022 19:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708859807542/bb25bced-4cb0-47bf-aa0f-81356db85999.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this tutorial, we will learn how to download and install <strong>MATLAB runtime</strong> package. MATLAB runtime allows to run compiled MATLAB applications or components without having MATLAB installed on a target machine.</p>
<h2 id="heading-usage-of-matlab-runtime">Usage of MATLAB runtime</h2>
<p>MATLAB runtime enables you to create and distribute applications, simulations, or software components created using MATLAB/Simulink. It allows to run compiled MATLAB/Simulink applications to run without having MATLAB installed on a target machine.</p>
<h2 id="heading-approach-1-using-command-window-in-matlab">Approach 1: Using command window in MATLAB</h2>
<p>Run the following command inside the MATLAB command window to start the download. Once, the download completes the matlab will provide the relevant <strong>(.zip</strong>).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1708543614904/3a1cb534-e592-4fd3-98ed-050adf9bada2.jpeg" alt="MATLAB runtime download using MATLAB command window" class="image--center mx-auto" /></p>
<p><strong>Note</strong><br />Depending on the MATLAB runtime version the download size may vary from <strong>1</strong> – <strong>5</strong> GB and can take significant download time.</p>
<h2 id="heading-approach-2-using-matlab-runtime-webpage">Approach 2: Using MATLAB runtime webpage</h2>
<p>The MATLAB runtime package can be download from the official MATLAB website using the following link:<br /><a target="_blank" href="https://nl.mathworks.com/products/compiler/matlab-runtime.html">MATLAB Runtime – MATLAB Compiler – MATLAB (mathworks.com)</a></p>
<p>The web page offers multiple versions for MATLAB Runtime and the user can download the relevant package as per their requirements.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1708543722006/f9faa7fb-4a88-4751-a3fc-c056dcef0b75.jpeg" alt="MATLAB runtime download using webpage" class="image--center mx-auto" /></p>
<p>Once the download completes you can <strong>unzip</strong> the MATLAB runtime package(.zip) and proceed to installation.</p>
<p><strong>Note</strong><br />The MATLAB runtime is version specific.</p>
<h2 id="heading-installing-matlab-runtime">Installing MATLAB runtime</h2>
<h3 id="heading-windows">Windows</h3>
<p>[1] <strong>Unzip</strong> the MATLAB Runtime installer (.zip) package.</p>
<p>For example:</p>
<p>Right-click the zip file <code>MATLAB_Runtime_R2022a_win64.zip</code> and select <strong>extract all</strong>.</p>
<p>[2] Double-click the file <code>setup.exe</code> from the extracted files to start the installer.</p>
<p>[3] Default installation folder: C:\Program Files\MATLAB\MATLAB Runtime\R2022a</p>
<h3 id="heading-linux">Linux</h3>
<p>[1] <strong>Unzip</strong> the MATLAB Runtime installer (.zip) at the terminal using the <code>unzip</code> command.</p>
<p>For example:</p>
<p>If you are unzipping the R2022a MATLAB Runtime installer then at the terminal type:</p>
<p><strong>unzip</strong> MATLAB_Runtime_R2022a_glnxa64.zip</p>
<p>[2] At the terminal type:</p>
<p>sudo -H ./install</p>
<p><strong>Note</strong><br />You may need to allow the root user to access the running X server:</p>
<ul>
<li><p>xhost +SI:localuser:root</p>
</li>
<li><p>sudo -H ./install</p>
</li>
<li><p>xhost -SI:localuser:root</p>
</li>
</ul>
<p>[3] Default installation folder: /usr/local/MATLAB/MATLAB_Runtime/R2022a</p>
<h3 id="heading-mac">Mac</h3>
<p>[1] <strong>Unzip</strong> the MATLAB Runtime installer (.zip) at the terminal using the <code>unzip</code> command.</p>
<p>For example:</p>
<p>If you are unzipping the R2022a MATLAB Runtime installer then at the terminal type:</p>
<p><strong>unzip</strong> MATLAB_Runtime_R2022a_maci64.zip</p>
<p>[2] At the terminal type:</p>
<p>sudo -H ./install</p>
<p>[3] Default installation folder: /Applications/MATLAB/MATLAB_Runtime/R2022a</p>
<p><strong>Note</strong><br />On <strong>Linux</strong> or <strong>MAC</strong> platform you have to setup the path environment variables MATLAB runtime to work properly. For instructions on setting the path environment variables, see official guide on how to <a target="_blank" href="https://nl.mathworks.com/help/compiler/mcr-path-settings-for-run-time-deployment.html">Set MATLAB Runtime Path for Deployment</a>.</p>
<h2 id="heading-checking-matlab-runtime-version">Checking MATLAB runtime version</h2>
<p>Use <strong>mcrversion</strong> in command window to return the return MATLAB Runtime version number that matches MATLAB version.</p>
<p>Use <strong>mcrinstaller</strong> in command window to return version and location information for MATLAB Runtime installer corresponding to your current platform.</p>
<ul>
<li><p><strong>Note</strong><br />  If MATLAB runtime is not already installed on your system it displays you the option to download it via MATLAB command window:</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1708543690662/da1780e3-2feb-4ea7-9839-653359ec79f2.jpeg" alt="mcrinstaller not finding MATLAB runtime package" class="image--center mx-auto" /></p>
</li>
</ul>
]]></content:encoded></item></channel></rss>