Home
User Guide
DB Recovery
Download
Documents
FAQ
Books
About Me
C Programs
Stats

/* Program# 21
   date : 25-12-2008
   Arithmetic operator or Not
*/

#include <stdio.h>
main(){
char a;
printf("\nEnter an operator :");
scanf("%c",&a);
if(a=='+' ||a=='-'||a=='*'||a=='/')
printf("\n %c: Arithmetic operator",a);
else
printf("\n %c: Not a Arithmetic operator",a);
}
output:
Enter an operator : +
+: Arithmetic operator


Things to note: Single digit, a single specical symbol also a character constant .

Powered by
Open Source Programmers