RUPAK SEARCH ENGINE

Custom Search

write a program to initialize the name, sex contact number and other in C program

//write a program to initialize the name, sex contact number and other in C
#include
#include
#include
void main()
{
int ward_num=6; // 2 bytes 32767 to -32768
char sex='f'; // 1 byte single character 'f' or 'm'
char name[30]="Laxmi Prasad Devkota"; // string or array of string
float phone=4781698; // 4 bytes containing decimal/exponent
double num_of_cell_in_body=9999999999999999999999999999; //8 bytes
// the basic data types are int,char,float,double
// besides, the data type qualifers are short, long, signed
// and unsigned
// for example short int, long int, unsigned in
clrscr();
printf("\nname:=%s:",name);
printf("\nphone=%.0f",phone);
printf("\nsex=%c",sex);
printf("\nbody cell=%f",num_of_cell_in_body);
printf("\nWard=%d",ward_num);
getch();
}

No comments:

Post a Comment