Search
 
SCRIPT & CODE EXAMPLE
 

C

c strcat

#include <stdio.h>
#include <string.h>

int main() {
  /*
  strcat(char * destination, const char *source)
  attaches source to destination
  */
  
  char buffer[100] = "Hello ";
  strcat(buffer, "World!");
  printf("Buffer: %s
", buffer);
  return 0;
}
Comment

c strstr

// CPP program to illustrate strstr()
#include <string.h>
#include <stdio.h>
  
int main()
{
    // Take any two strings
    char s1[] = "GeeksforGeeks";
    char s2[] = "for";
    char* p;
  
    // Find first occurrence of s2 in s1
    p = strstr(s1, s2);
  
    // Prints the result
    if (p) {
        printf("String found
");
        printf("First occurrence of string '%s' in '%s' is '%s'", s2, s1, p);
    } else
        printf("String not found
");
  
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: fgets c 
C :: getchar 
C :: check if pid exists c 
C :: int to double c 
C :: enregistrement en c 
C :: c bits 
C :: linked list using c 
C :: how compress string in c 
C :: qtableview get selected row 
C :: c change value of const 
C :: recursive in c 
C :: sockaddr_in c 
C :: c language 
C :: adding a node in the front on a linked list 
C :: c structure with pointer 
C :: sqrt function in c 
C :: array of strings c 
C :: Multi-line Comments in C 
C :: Increment & Decrement Operator in C language 
C :: what is %d in C 
C :: localStorage.setItem multpile arra 
C :: cast from float to long c 
C :: add c program 
C :: What does x = (a<b)? A:b mean in C programming? 
C :: typecating in c 
C :: clipboard lib 
C :: Multi Select with icons htm; 
C :: when to add & in snacf c 
C :: what is the difference between algorithm and flowchart in c program 
C :: nc,manc 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =