ÿþ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>gET iT i sAY .giis - ext3 File Undelete Tool </title> <META HTTP-EQUIV="Content-Type" CONTENT="text/css; charset=ISO-8859-1"> <META HTTP-EQUIV="EXPIRES" CONTENT="0"> <META NAME="RESOURCE-TYPE" CONTENT="DOCUMENT"> <META NAME="DISTRIBUTION" CONTENT="GLOBAL"> <META NAME="AUTHOR" CONTENT="Lakshmipathi.G"> <META NAME="COPYRIGHT" CONTENT="Copyright (c) by Lakshmipathi.G"> <META NAME="KEYWORDS" CONTENT="C Programs , C Program Examples,C Program Tutorials,single digit or not,logical and && operator"> <META NAME="DESCRIPTION" CONTENT="C program guide with examples"> <META NAME="ROBOTS" CONTENT="INDEX, FOLLOW"> <META NAME="REVISIT-AFTER" CONTENT="1 DAYS"> <META NAME="RATING" CONTENT="GENERAL"> <META NAME="GENERATOR" CONTENT="Gedit"> <link rel="STYLESHEET" href="css/styles.css" TYPE="text/css" /> </head> <body> <TABLE cellspacing=10 cellpadding=10 border=0 width="100%"><TR> <TD valign="top"> <TABLE cellpadding=2 cellspacing=0 border=0 width="100%"> <TR><TD><a href="http://www.giis.co.in" ><IMG src="../images/giis_ext_undelete_tool.png" width="111" height="116" border=0></a></TD></TR> <TR><TD><HR></TD></TR></TABLE> <TABLE cellpadding="2" cellspacing="0" border="0" width="100%" bgcolor="lightGray"> <TR><TD><a href="../index.html">Home</a></TD></TR> <TR><TD><a href="../giis_user_guide.html" >User Guide</a><br></TD></TR> <TR><TD><a href="../giis_mysql_screenshots.html" >DB Recovery</a><br></TD></TR> <TR><TD><a href="../download.html">Download</a></TD></TR> <TR><TD><a href="../manuals.html">Documents </a></TD></TR> <TR><TD><a href="../raq.html" >FAQ</a></TD></TR> <TR><TD><a href="../books.html">Books</a></TD></TR> <TR><TD><a href="../readme.html">About Me</a></TD></TR> <TR><TD><a href="../programs.html">C Programs</a></TD></TR> <TR><TD><a href="../stat.html">Stats</a></TD></TR </TABLE> </TD> <TD valign="top"> <font color="purple"><br> <pre> /* Program# 18 date : 25-12-2008 Single digit or not */ #include &lt;stdio.h&gt; main(){ int n; printf("\nEnter a positive number :"); scanf("%d",&n); if(n>=0 && n<=9) printf("Single digit number");// this will be printed, only if both the conditions are true. else printf("Not a Single digit number"); } </pre> <b><font color="purple" size="+2"> output:<br></font></b><font color="purple" size="+2"> Enter a positive number : 5 <br>Single digit number</font></td></tr> </tbody></table><br><br> <b><font size="+2">Things to note:</font></b><b> Hierarchy of operators:<b><br><br><table border=1 align=center> <tr><th>Operators<th>Type</tr> <tr><td>!<td>Logical NOT <tr><td>* / % <td>Arithmetic and modulus <tr><td> + - <td>Arithmetic <tr><td> < > <= >= <td>Relational <tr><td> == != <td>Relational <tr><td> && <td>Logical AND <tr><td> || <td>Logical OR <tr><td> = <td>Assignment</table><p> Since the relational operator has higher precedence over Logical AND, it is evaluated first and the result is combined with && to give the result.</p> <strong><H4 style="color : #006600; text-align : center;">Powered by <br>Open Source Programmers</H4></strong> </TD> </TR> </TABLE> </body> </html>