Code:
#include<stdio.h>
#define LEGAL 1 

void count(char array[]);

int main()
{

   //char line[100];

  char* line = new char;

    printf("Hey user enter some lines : ");
   //scanf("%s",line);

   gets(line);

    count(line);
    return(0);
}
/* FUNCTION count */

void count(char array[])
{    
    char c;
    int x,z=0;
        /* Wat to do to count \n and \t and blanks */
            for(x = 0 ;(c = array[x]) != '\0' ; x++)
            {        
                z++;
            }            
    printf("%d\n",z);
}

Last edited by shabbir; 24Mar2010 at 16:52.. Reason: Code blocks