C - String

Arrays and Strings in Tamil


Learn C - C tutorial - C string - C examples - C programs

C String - Definition and Usage

  • In C- Programming, Strings are nothing but the array of characters ended with null character (‘\0’).
  • This null character indicates the end of the string.
  • Strings are always enclosed by double quotes. Whereas, character is enclosed by single quotes in C.
C String

Sample - C Code

#include <stdio.h>
#include <conio.h>
void main ()
   char a[20] = "wikitechy.com";
   printf("The string is : %s \n", a);

C Code - Explanation

  1. Here in this statement we declare the character array with the name of the variable name as “a” and the size of the array as “20” .
  2. In this statement we print the string value of the variable “a”..

Sample Output - Programming Examples

  1. Here in this output we print the string “wikitechy.com” as shown above.

View More Quick Examples

Related Searches to c string