Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions
Interview Questions and Answers :: Broadcom Ltd

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