Read String in C - Read String in C Program



 Read String in C Program

Learn c - c tutorial - Read String in C Program - c examples - c programs

Read String in C Program

  • A string in C is simply an array of characters. The length of a string is determined by a terminating null character.
  • In programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable.
  • The latter could allow its elements to be mutated and the length modified, or it may be fixed.

Sample Code

#include <stdio.h>
int main()
{
    char name[30]="wikitechy";
    printf("Given Name:wikitechy \n");
    printf("Name is: %s\n",name);
    return 0;
}

Output

Given Name:wikitechy 
Name is: wikitechy


View More Quick Examples


Related Searches to Read String in C - Read String in C Program