Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

what are strings in c

// C program to illustrate strings
  
#include <stdio.h>
#include <string.h>
  
int main()
{
    // declare and initialize string
    char str[] = "Geeks";
  
    // print string
    printf("%s
", str);
    
    int length = 0;
    length = strlen(str);
    
      // displaying the length of string
    printf("Length of string str is %d", length);
  
    return 0;
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #strings
ADD COMMENT
Topic
Name
8+5 =