The iscntrl() function is used in C programming to determine whether a given character is a control character. Here is the syntax for the iscntrl() function:
<span class="hljs-meta">#<span class="hljs-keyword">include</span> <span class="hljs-string"><ctype.h></span></span>
<span class="hljs-type">int</span> <span class="hljs-title function_">iscntrl</span><span class="hljs-params">(<span class="hljs-type">int</span> c)</span>;
The iscntrl() function takes an integer c as an argument, which represents the character to be checked. It returns an integer value:
- If the character
cis a control character, the function returns a non-zero value (true). - If the character
cis not a control character, the function returns zero (false).
Annie Sanjana Answered question May 13, 2023
