Program To Accept A Line Of Text Into A Character Array
/* Program To Accept A Line Of Text Into A Character Array And Then Display The No. Of Occurences Of The Specified Character In The Line Of Text */ #include
#include
void main() { char text[30]; char ch; int i=0,sz,c=0; clrscr(); printf("\n enter text..( control(z) to stop)\n"); while( (ch=getchar()) !=EOF ) { text[i]=ch; i++; if( i==30 ) break; } sz=i; printf("\n enter the character\n"); ch=getchar(); for( i=0;i
Please send comments to
vgdarur.javafive@blogger.com
Copyright © 2008 - iForeRunner.com
http://www.iforerunner.com/