Character Array
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
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
clear screen
The function used to clear the screen for the current executed program to display it output on screen.clrscr stands for clear screen.
Syntax: clrscr();
sizeof() function
The function used to give the number of bytes occupied given value, that to find the size of the given value.
Syntax: sizeof (operand/value);
Example:
#include<stdio.h>
#include<conio.h>
void main ()
{
printf(“size of char = %d”,sizeof(char));
getch();
}
Output: size of char=1
Syntax: clrscr();
sizeof() function
The function used to give the number of bytes occupied given value, that to find the size of the given value.
Syntax: sizeof (operand/value);
Example:
#include<stdio.h>
#include<conio.h>
void main ()
{
printf(“size of char = %d”,sizeof(char));
getch();
}
Output: size of char=1