Write a C program to check a char: is it a control letter.
Menu
Turn Mobile View Off
by Dinesh Thakur

 

 

#include<ctype.h>

#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
for(;;)
{
ch = getchar();
if(ch=='.') break;
if(iscntrl(ch)) printf("%c is a control character\n", ch);
}
getch();
}
 
OUTPUT:
a
a is a control character
Dinesh Thakur is a Technology Columinist and founder of Computer Notes and Technology Motivation. Turn Mobile View Off