Warning: include_once(../../../headder.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter2_b.php on line 16

Warning: include_once(): Failed opening '../../../headder.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter2_b.php on line 16

CBSE eBooks

CBSE Guess > eBooks > Class XII > Computer Science By . Mr. MRK

Chapter – 2. STRUCTURES

Previous Index Next


Warning: include(../../../ads_330x250_middle.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter2_b.php on line 26

Warning: include(): Failed opening '../../../ads_330x250_middle.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter2_b.php on line 26

Eg1:
struct date
{
int dd; int mm; int yy;
};
struct student
{
char name[20]; int roll; date dob; int marks;
};
The member of a nested structure is referenced from the outermost to innermost with the help of dot operators. student stud;
Then the members of the nested structure can be accessed as stud.dob.mm=10;
Eg2:
struct addr int houseno;
{
char area[26];
char city[26];
char state[26];
};
struct emp
{
int empno;

char name[26];
char design[16];
addr address;
float basic;
};
emp worker ;

2006 Outside Delhi:

1.C. Rewrite the following program after removing the syntactical error(s), if any. Underline each correction. 2

#include<iostream.h>
void main( )
{
struct movie
{
char movie_name[20];
char movie_type;
int ticket_cost=100; MOVIE;
}
gets(movie_name);
gets(movie_type);
}

 

Previous Index Next


Warning: include(../../../120_60_others.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter2_b.php on line 73

Warning: include(): Failed opening '../../../120_60_others.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science/chapter2_b.php on line 73