LED PANEL

Google It, You'll Get It.

Saturday, February 5, 2011

String starting with 'b; in a given series of strings


header file stdio.h
header file string.h


main()

{
int i;
const int stringLimit = 5;

char s[stringLimit][50]; //row and column

printf("enter the strings \n");
for(i=0;i gets(s[i]);

/*for(i=0;i // if(str[i][0]=='b';
printf("str %s \n",s[i]);*/

printf("\n strings Starting wIth letter 'b' \n");
for(i=0;i if(s[i][0]=='b')
printf("word %d : %s \n",i+1,s[i]);

}

1 comment:

  1. hi i'm bhathiya perera
    this is nice,i just love the use of printf instead of cout hehe.

    www

    personal : http://jadogg.phatcode.net
    *coded in freeBASIC,FASM,MASM32

    linux (remaster): http://ceylonx.sf.net
    *application launcher coded in freeBASIC

    ReplyDelete