Responsive Ads Here

Friday, November 21, 2014

count the length of a sentence without string function

count the length of a sentence

 

//HOW MANY LETTER ARRY
#include<stdio.h>
int main()
{
    char a[100];
    int i,c=0;
    gets(a);
   //scanf("%s",a);
   for(i=0;a[i]!='\0';i++)
   {
       c=c++;
   }
    printf("%d",c);
    return 0;
}

No comments:

Post a Comment

php4

<?php    // Start the session  session_start();  ?>  <!DOCTYPE html>  <html>  <head>       <link rel=&q...