Categories
Uncategorised

Constructors – Person Data

/* Copyright © 2007 Ankur Banerjee. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. http://www.fsf.org/licensing/licenses/lgpl.html /

/ Constructors – Person Data /

#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <string.h>

int flag = 0;

class address
{
char name[20], street[15], city[20], state[15];
int houseno;
public:
address()
{
houseno = 0;
strcpy(name, ”);
strcpy(street, ”);
strcpy(city, ”);
strcpy(state, ”);
}
address(int num, char n[20], char st[15])
{
houseno = num;
strcpy(name, n);
strcpy(street, st);
strcpy(city, “Delhi”);
strcpy(state, “India”);
}
void disp(char n[20])
{
if (strcmp(n, name) == 0)
{
cout<<endl<<“Name : “<<name<<endl
<<“House number : “<<houseno<<endl
<<“Street : “<<street<<endl
<<“City : “<<city<<endl
<<“State : “<<state<<endl;
flag = 1;
}
}
} ;

void main()
{
clrscr();
int h;
char n[20], st[15];
cout<<endl<<“Enter house number : “;
cin>>h;
cout<<“Enter name : “;
gets(n);
cout<<“Enter street : “;
gets(st);
address ad (h, n, st);
cout<<“Enter the same name again : “;
gets(n);
ad.disp(n);
if (flag == 0)
cout<<endl<<“Moron, I said enter the SAME name!”<<endl;
getch();
}

/ Output */

Enter house number : 42
Enter name : Arthur Dent
Enter street : 42, Guide Road
Enter the same name again : Arthur Dent

Name : Arthur Dent
House number : 42
Street : 42, Guide Road
City : Delhi
State : India

Categories
Uncategorised

Class 12th B Time Table 2007-08

I guess hardly anyone cares for a time table in our class now, but they underestimate its utility. It is a highly important official document which allows students to count down to the number of periods left for the next PE period. Or when to let loose that big sigh because a boring teacher is going to come along. For me though, it has been a faithful companion, which helps me decide my return schedule to class after missing them for various Code Warrior activities. It is vital that you return to class (IF at all…) when it’s a non-ferocious teacher’s period, otherwise you’re screwed. If you happen to screw up your math paper, and return after a CW meeting in Yemleda’s period, wish you luck in escaping alive. Which is why I’ve always kept copies through my 6 years or so of ECA; not that I return to class generally though (although, sigh, this year, till now, has been a different story). Click here to download the Class 12th B 2007-2008 time table. Note: If any changes are made, I’ll update it. Download link will remain same. Feeling nostalgic? Click here to download the Class 11th B 2007-2008 time table.