[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.
Interview Questions and Answers :: Tavant Technologies

2. Write your own strlen() program.

Answer:

#include<stdio.h>


void strlength(char c[])

{

   char *p=c;

  int count=0;

  while(*p!=NULL)

  {

    *p++;

    count++;

  }

printf("%d",count);  

}

int main()

{

  char c[]="prachi katarua";

   strlength(c);

  return 0;

}

Post Your Answer Here:      Public      Private

Rate This: +0 -0
Report     

Post Your Reply Here:     

Report Error

Report Error

Please Login First Click Here