123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home

Source Codes

BE Students

Training  Reports (updated)

Placement Papers (updated)

Forums

   Computer Science / IT

   Electronics

   Electrical

   Mechanical

   Chemical

   Civil

   CAT / MBA

   GMAT / Foreign MBA

Latest Jobs

Engineering Jobs / Technical Jobs

Management Jobs

Sitemap

About-Us

Terms of use

Displaying  Source Code(s)  
 

 
Program to find out if entered string contains a space character.

--------------------------------------------------------------------------------



#include <stdio.h>
#include <conio.h>
#include <ctype.h>
space(char s);
void main()
{

char s;
clrscr();
printf("Enter string.");
printf("
String will be terminated if you press Ctrl-Z.");
printf("
STRING:- ");
space(s);
printf("




HAVE A NICE DAY! BYE.");
getch();
}

space(char s)
{
int i;
s=getchar();
for (i=0;(s=getchar())!=EOF;i++)
{
if (s==' ')
{
printf("String contains a space character.");
break;
}
}
if (s==EOF)
printf("String does not contain a space character.");
return(s);
}

 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG