A data type use to store strung
values written in double quotes is called character array.
Syntax:
Char variable name[no of
characters/no of string]
Example:
#include<stdio.h>
#include<conio.h>
void main ()
{
Char name[]=”computer”;
Char limit[10]=”0123456789”;
printf(“the name of subject
=%s”,name);
printf(“limited
string=%s”,limit);
getch();
}
Output:
the name of subject =computer
limited string=0123456789
No comments:
Post a Comment