Structure 1 Structure student name surname age char
- Slides: 32
Structure 1
�������� (Structure) student ��� � ������ � name surname age char sex[7]; sex float grade; grade char name[20]; char surname[30]; int age; 5
�������� (Structure) struct book { char code[7]; float price; int year; } code 7 bytes price year 4 bytes 2 bytes 6
�������� struct student { char int char float }; struct date { int }; struct sdate { char }; name[20]; surname[30]; age; sex[7]; grade; day, month, year; day[3], month[3]; year[5]; 8
�������� struct student { char name[20]; char surname[30]; int age; char sex[7]; float grade; } student 1; struct date { int day, month, year; } vacation, birthday; 11
�������� n ������������� struct student { “������ ” ����� char name[20]; char surname[30]; int age; char sex[7]; float grade; } student 1; � 12
�������� #include <stdio. h> struct income { float salary, bonus; int age; }; void main(void) { struct income somsri; somsri. salary = 18000. 00; somsri. bonus = 30000. 00; somsri. age = 23; } 15
����������������� #include <stdio. h> #include <string. h> struct letter { char name[20]; char address[30]; char message[40]; }; void main(void) { struct letter first; printf("Enter name : "); gets(first. name); printf("Enter address : "); scanf("%s", first. address); strcpy(first. message, "How r u? "); printf("n. NAME is %s", first. name); printf("n. Address is %s", first. address); printf("n. Message : %s", first. message); } 17
���� n ��������� ������ #include <stdio. h> main() { struct profile { char name[20]; int age; char grade; }; struct profile student[10]; } 22
������ struct profile { char name[20]; int age; char grade; } student[3]; name 20 bytes age 2 1 grade student[0] student[1] student[2] 23
�������� #include <stdio. h> #include <string. h> main() { struct profile { char name[20]; int age; char grade; }student[10]; clrscr(); strcpy(student[0]. name, “Manee”); student[2]. age = 12; student[4]. grade = ‘A’; printf(“%sn”, student[0]. name); printf(“%dn”, student[2]. age); printf(“%cn”, student[4]. grade); } 25
�������� #include <stdio. h< #include <conio. h< void main() } struct } char id[10; [ char name[30; [ int age; { std[4; [ int i; printf("Please <Enter> for Input 5 record: n; (" for(i=0; i<4; i(++ } printf("-------------------------n; (" printf("RECORD # %d n", i+1; ( printf("t. CODE; (" : scanf("%s", std[i]. id; ( 26
printf("t. NAME; (" : scanf("%s", std[i]. name; ( printf("t. AGE; (": scanf("%d", &std[i]. age; ( { printf("n------ OUT PUT ------ n; (" printf(" CODE NAME for(i=0; i<4; i(++ AGEn; (" } printf("%s %s %d n", std[i]. id , std[i]. name, std[i]. age; ( { getch; () { 27
28
���� n ���� union my. Union { int i; float x; }; union my. Union u 1; my. Union i x u 1 ������� 4 ���� 31
- Surname in form
- Is first name surname
- Surname or last name
- Struct student char *name
- Struct student char *name
- Const int size=18; string *tb12 = new string[size];
- Ontinue
- Stone age chronology
- Iron age bronze age stone age timeline
- Class maths student student1 class student string name
- Surname example
- Surname
- What's a surname
- Percentage of brahmins in india
- Author surname and initials example
- What is title in personal information
- Loeb last name
- Student id name department name
- Struct char name 25 charlanguage 10
- Char name[20]
- Char *name
- Char name[20]
- Char name 20
- Name 3 points
- Puberty
- Victorian age and modern age
- Paleolithic vs neolithic
- Difference between stone age and modern age
- "age of trilobites" or "age of fish".
- The staple food of the vedic aryans was-
- Victorian period in english literature
- Monash university special entry and access scheme
- Age income student credit_rating buys_computer