Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

use of strstr in c++

/* strstr example */
#include <stdio.h>
#include <string.h>

int main ()
{
  char str[] ="This is a simple string";
  char * pch;
  pch = strstr (str,"simple");
  strncpy (pch,"sample",6);
  puts (str);
  return 0;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #strstr
ADD COMMENT
Topic
Name
5+9 =