Tuesday, June 28, 2016

SMU Assignment (Sem-1) MCA1020- PROGRAMMING IN C

MCA1020- PROGRAMMING IN C


Q1.)    Explain the history of C Language. What are the advantages of C language?
Ans.)    C was developed by Dennis Ritchie & came after B in the year 1972.

C is a general-purpose language which has been closely associated with the UNIX operating system for which it was developed - since the system and most of the programs that run it are written in C. Its instructions consist of terms that resemble algebraic expressions, augmented by certain English keywords such as if, else, for, do & while.

C was the offspring of the ‘Basic Combined Programming Language’ (BPCL) called B, developed in the 1960’s at Cambridge University.

In C, the type of a variable determines what kind of values it may take on. The type of an object determines the set of values it can have & what operations can be performed on it. This is a fairly formal, mathematical definition of what a type is, but it is traditional (& meaningful)

Advantages of C Language:-
·         C language is a building block for many other currently known languages.
C language has variety of 
data types and powerful operators. Due to this, programs written in C language are efficient, fast and easy to understand.

·         C is highly portable language. This means that C programs written for one computer can easily run on another computer without any change or by doing a little change.

·         There are only 32 keywords in ANSI C and its strength lies in its built-in functions. Several standard functions are available which can be used for developing programs.

·         Another important advantage of C is its ability to extend itself. A C program is basically a collection of functions that are supported by the C library this makes us easier to add our own functions to C library. Due to the availability of large number of functions, the programming task becomes simple.

·         C language is a structured programming language. This makes user to think of a problem in terms of function modules or blocks. Collection of these modules makes a complete program. This modular structure makes program debugging, testing and maintenance easier.
--------------------------------------------------------------------------------------------------------------------------

Q2.)    Differentiate between formal parameters and actual parameters with example
Ans.)   Formal Parameter:-

·        Consider y = f(x) // where x is independent & value of y is dependent on value returned by f. Here f(x) is formal parameter or argument to f

·        Formal parameters are place holders for values of "Actual parameter"

·        Formal parameters are declared / defined during function definition.
Examples:-
int f (int x):- x is formal parameter
int miles (int km, int mileage):- km & mileage are formal parameter

Actual parameter:-
·        In C program values that appears inside the parentheses are called "Actual Parameter"

·        Formal parameters must match in position, number & type

·        When a function call is made a memory location is allocated for each formal parameter & a copy of corresponding actual parameter is kept in that memory location. All calculations involving the formal parameter use this memory location.

·        Actual parameters are always "Passed" & variables that are declared & passed as arguments to procedure by caller.

     Examples :-
      #define MILEAGE 25:- Here MILEAGE is actual parameter
int miles(int gallons, int mileage):- Both gallons & mileage are formal parameters

Consider following example:-
Problem:-
 Accepts a number of gallons as input from end user and calculates & displays the number of miles that can be traveled

#include
#define MILEAGE 25
int miles(int gallons, int mileage);
int main(void)
{
int f ;                           /*(f is actual parameter & f stores value in Gallons)*/
printf ("Enter number of Gallons of Gas : ");
scanf ("%d", &f);
printf ("\n You will be able to travel %d miles from %d Gallons of Gasoline", miles (f, MILEAGE),f);


/* here f & MILEAGE are actual parameters whose values are stored into gallons & mileage respectively which are formal parameters*/

return 0;
}
int miles(int gallons, int mileage)
{
return ( gallons * mileage); /*Here both are formal parameters i.e. gallons & mileage*/
}
-----------------------------------------------------------------------------------------------------------------

Q3.)    Describe about static and external variables.
Ans.)   Static Variables: Static variables are defined within individual functions & therefore have the same scope as automatic variables, i.e. they are local to the functions in which they are declared. Unlike automatic variables, however, static variables retain their values throughout the life of the program. As a result, if a function is exited & then reentered later, the static variables defined within that function will retain their previous values. This feature allows function to retain information permanently throughout the execution of a program.  Static variables can be utilized within the function in the same manner as other variables. They cannot be accessed outside of their defining function. In order to declare a static variable the keyword static is used as shown below:

Static int count;

External Variables: It is possible to split a function up into several source files, for easier maintenance. When several source files are combined into one program the compiler must have a way of correlating the variables which might be used to communicate between the several source files. Furthermore, if a variable is going to be useful for communication, there must be exactly one of it: you wouldn’t want one function in one source file to store a value in one variable named externvar, & then have another function in another source file read from a different variable named externvar. Therefore, a variable should have exactly one defining instance, in one place in one source file. If the same variable is to be used anywhere else (i.e. in some other source file or files), the variable is declared in those other file(s) with an external declaration, which is not a defining instance. The external declaration says the compiler that the variable will be used in this source file but defined in some other source file. Thus the compiler doesn’t allocate space for that variable with this source file.
To make a variable as an external declaration, which is defined somewhere else; you precede it with the keyword extern:

                                                Extern int j;

-----------------------------------------------------------------------------------------------------------------

Q4.)    Distinguish between pass by value and pass by reference with the help of an example.
Ans.)   Pass By value: Function in C passes all arguments by value. When a single value is passed to a function via an actual argument, the value of the actual argument is copied into the function. Therefore, the value of the corresponding formal argument can be altered within the function, but the value of the actual argument within the calling routine will not change. This procedure for passing the value of an argument to a function is known as passing by value.

For example:
#include <stdio.h>
#include <conio.h>
Int add (int p, int q);
Int main ()
{
Int a, b, c;
Clrscr();
Printf (“Enter two numbers\n”);
Scanf (“%d%d” , &a, &b);
C=30;
Printf (“\n Sum of %d & %d is %d”, a, b, c);
Getch();
Return 0;
}
Int add (int p, int q)
{
Int result;
Result = p + q;
Return (result);
}

Pass by reference: When passing by reference technique is used, the address of the data item is passed to the called function. Using & operator we can determine the address of the data item. Note that function once receives a data item by reference, it acts on data item and the changes made to the data item also reflect on the calling function. Here you don't need to return anything to calling function. For Example:
#include <stdio.h>
#include <conio.h>
Void add (int *p, int *q, int *r);
Void main()
{
Int a, b, c;
Clrscr ();
Prntf(“Enter two number \n”);
Scanf (“%d%d”,&a,&b);
Add (&a,&b,&c);
Printf (“Sum of %d & %d is %d”, a, b, c);
Getch();
}
Void add (int *p, int *q, int *r)
{
*r = *p + *q;
}
-----------------------------------------------------------------------------------------------------------------

Q5.)    Define macro. How can we declare a macro statement? Explain with an example.
Ans.)   A macro is a name given to a block of C statements as a pre-processor directive. Being a pre-processor, the block of code is communicated to the compiler before entering into the actual coding (main () function). A macro is defined with the preprocessor directive.
A preprocessor line of the form:

# define name text

Defines a macro with the given name, having as its value the given replacement text. After that (for the test of the current source file), wherever the preprocessor sees that name, it will replace it with the replacement text. The name follows the same rules as ordinary identifiers (it can contain only letters, digits, & underscores, & may not begin with a digit). Since macro behave quite differently from normal variables (or functions), it is customary to give them names which are all capital letters (or at least which begin with a capital letter). The replacement text can be absolutely anything – it’s not restricted to numbers, or simple strings, or anything.
The most common use for macros is to propagate various constants around & to make them more self-documenting. We’ve been saying things like

                                    Char line [100];
                                    …
                                    Getline (line, 100);

But this is neither readable nor reliable; it’s not necessarily obvious what all those 100’s scattered around the program are, & if we ever decide that 100 is too small for the size of the array to hold lines, we’ll have to remember to change the number in two (or more) places. A much better solution is to use a macro:

                                    # define MAXLINE 100
                                    Char line [MAXLINE];
                                    …
                                    Getline (line, MAXLINE);

Since the replacement text of a preprocessor macro can be anything, it can also be an expression, although you have to realize that, as always the text is substituted (& perhaps evaluated) later. No evaluation is performed when the macro is defined. For example, suppose that you write something like

#define A 2
#define B 3
#define C A + B

-----------------------------------------------------------------------------------------------------------------

Q6.)    What is the use of fopen () and fclose () function? List and explain different modes for opening a file.
Ans.)   fopen () function: - fopen () function will open file specified in the specified mode. After opening file in the read mode fopen () will return the address of the structure that contains information needed for subsequent I/O on the file being opened.(i.e. File Pointer)In order to store file pointer we have assigned return address to FILE pointer variable “fp“.

Example:
#include<stdio.h>
void main()
{
FILE *fp;
char ch;
fp = fopen("INPUT.txt","r");                here fopen () will open “INPUT.txt” in the “Read” mode}
 while(1)
  {
  ch = fgetc(fp);
  if(ch == EOF )
   break;
  printf("%c", ch);
  }
fclose(fp);
}


fclose () function :- Whenever we open a file in read or write mode then we perform appropriate operations on file and when file is no longer needed then we close the file using fclose() function.

Example:
#include<stdio.h>
int main()
{
FILE *fp;
fp = fopen("INPUT.txt","r")
  -----------
  -----------
  fclose(fp);                                                    //File is no longer needed
}

Different modes for opening a file:- File can be opened in basic 3 modes: Reading Mode, Writing Mode, Appending Mode. If File is not present on the path specified then New File can be created using Write and Append Mode.

Mode
Meaning
fopen Returns if  FILE-
Exists
Not Exists
r
Reading
NULL
w
Writing
Over write on Existing
Create New File
a
Append
Create New File
r+
Reading + Writing
New data is written at the beginning overwriting existing data
Create New File
w+
Reading + Writing
Over write on Existing
Create New File
a+
Reading + Appending
New data is appended at the end of file
Create New File

SMU Assignment (Sem-1) MCA1040- SYSTEM ANALYSIS AND DESIGN

MCA1040- SYSTEM ANALYSIS AND DESIGN

Q1.)    Describe the following:-

a)  Transaction Processing Systems (TPS):- The most basic computer based system in an organization is related to business transactions. A transactions processing system is a computer based system that captures, categories, accumulates, maintains, updates & recovers transaction data for record maintaining & for input to other kind of CBIS.

Activities covered under transaction processing system are placing orders, billing customers, appointing employees, depositing cheques, etc. Transaction processing systems offer orderliness, speed & accuracy & can be programmed to follow routines without any inconsistency.

Example of TPS: Withdrawing of money by you from an ATM machine is a good example of TPS. The transaction must be carried out instantaneously & the account balance updated as quickly as possible, to authorize the client & the financial institution having the account to preserve a records of funds.

b)  Management Information Systems (MIS):- Management information system (MIS) broadly refers to a computer-based system that provides managers with the tools to organize evaluate and efficiently manage departments within an organization. In order to provide past, present and prediction information, a management information system can include software that helps in decision making, data resources such as databases, the hardware resources of a system, decision support systems, people management and project management applications, and any computerized processes that enable the department to run efficiently. This information must be important, timely, precise, complete & concise & inexpensively feasible.

Example of MIS: Monetary Accounting System.

c)  Decision Support Systems (DSS):- The term refers to an interactive computerized system that gathers and presents data from a wide range of sources, typically for business purposes. DSS applications are systems and subsystems that help people make decisions based on data that is culled from a wide range of sources.

Example of DSS: A national on-line book seller wants to begin selling its products internationally but first needs to determine if that will be a wise business decision. The vendor can use a DSS to gather information from its own resources (using a tool such as OLAP) to determine if the company has the ability or potential ability to expand its business and also from external resources, such as industry data, to determine if there is indeed a demand to meet. The DSS will collect and analyze the data and then present it in a way that can be interpreted by humans. Some decision support systems come very close to acting as artificial intelligence agents.

d)  Office Automation Systems (OAS):- Office automation refers to the computer systems & software used to generate, gather, stock, & communicate office information required for completing basic tasks & goals. Data storage, electronic transmission & the management of business information are the basic activities of an OAS.
--------------------------------------------------------------------------------------------------------------------------

Q2.)    Define attributes. What are the two attribute classifications? Explain about properties and characteristics.
Ans.)   The term ‘Attributes’ stands for functional or physical traits of a system. System attributes are considered as the supposed qualities of the system. Some examples of attributes are temperature, location, state, gender, income levels, etc.

The Two attribute classifications are:-

·        Functional attributes: are performance parameters, which can be measured such as reliability, safety & maintainability.
·        Physical attributes: are qualitative & quantitative aspects of material features such as dimensions, composition, form, finishes & fit.

Properties:

The term ‘Properties’ indicate the mass properties of a system. Examples of properties are weight, density, & dimensions like length, breadth or height.

Characteristics:

The term ‘Characteristics’ stands for the physical & behavioral qualities that exclusively separate one system from another.

·        Examples of physical characteristics include equipment warm-up, radar cross-sections of a jet, vehicle speeding up to cruise speed, stopping; etc.
·        Examples of behavioral characteristics include responsivity & predictability. 

--------------------------------------------------------------------------------------------------------------------------

Q3.)    Explain the concept of Analysis and Design in system development life cycle.
Ans.)   System development is a quite a challenging & difficult task. In developing a big integrated system, like MIS, a lot of people are involved & several months or even years are devoted for completion. But, a small autonomous application, like payroll, can be generated in a number of weeks or months by a single or only a few programmers. For these kinds of small systems, system development activities may be performed perfectly without appropriate documentation. But, for big systems, these activities must be performed unambiguously with appropriate preparation & documentation.

In both small & large system, system development rotates about a life cycle that starts with the identification of user’s requirements & recognizing their difficulties. Such a life cycle including numerous phases is known as System Development Life Cycle (SDLC).

Analysis Phase

Analysis phase considered as a comprehensive study of numerous operations accomplished by the system & their association inside & outside of the system. It also involves understanding the nature of the information & functions of the software that is required for the system. The main question is: what to do to solve the problem?

One facet of analysis is specifying the limitations of the system & identifying whether or not a system should take into account other relates systems. During analysis, data is gathered on accessible files & transactions managed by the existing system.

It needs special skills & understanding by the analyst of the subjects being interviewed. Prejudice of the analyst in data gathering & its interpretation can be problem. Training, experience & common sense are needed for compilation of the information required to perform analysis. After completing the analysis, the analyst has a clear understanding of what is to be performed.

After the systems analyst has decided that the requested system is feasible & the management has permitted to carry on the development procedure, then SDLC goes into its next phase of requirements determination & prepares a Software Requirements Specifications (SRS) document. Once the SRS Document is prepared, the analyst moves on to the design phase where the total cost of the system is estimated.

Design Phase

The next phase that comes after analysis is system design. After completion of software Requirements Specification (SRS) document in analysis phase, the analyst makes a plan to handle the software project. System planning is considered as the most essential part of the design phase.

System planning involves the total cost estimation of developing the system together with the estimation of total time period needed. A project team is finalized with complete staff needed for each phase. Now, the analyst decides how the problem can be solved. Therefore, in the systems design phase, we shift from the logical to the physical aspects of the life cycle.

System design is considered as the most inventive & challenging phase of the system life cycle. The term design portrays a final system & a method by which it is developed. It points to the technical specifications (similar to the engineer’s proposals) that will be applied in executing the system. It also involves the building of programs & program testing. 

--------------------------------------------------------------------------------------------------------------------------

Q4.)    Write short notes on:

a) Data Dictionary: - A catalogue comprising all data elements, data structures & processes depicted in logical DFDs is known as a data dictionary. 

b) Data Element: Data element is defined as the smallest unit of data having some meaning. For e.g. part code, part name, etc., are data elements.

c) Data Structure: A set of data elements that illustrate a unit in the system is known as a data structure. For e.g. Part Details is a data structure comprising part code, part name, etc., data elements.

d) Data Store: A data structure used for gathering data input throughout processing is known as data store. For e.g. Part Register is a data store.

e) Data Flow: A data structure that represents a unit of data in motion is known as data flow. For e.g. a data flow, New Part Details moves from an external entity to a process.
--------------------------------------------------------------------------------------------------------------------------

Q5.)    What are the different types of methods used for the training of operators and users? Discuss.
Ans.)   The success or failure of a well-designed system depends on the manner in which it is operated & used. Thus, the quality of training obtained by the personnel related with the system in different capacities helps in the system’s successful implementation.

Those who are associated with the system development work, directly or indirectly, must recognize in detail what their roles will be, how they can make efficient utilization of the system & what the system will do for them. Training is required for both systems operators & users.

There are different methods for organizing training of operators & users. Most significant among them are as follows:

·        Vendor & In-service Training: The best source of training is the vendor who provides the equipment. Mainly, vendors provide extensive educational programs included in their services. The courses provided by experienced trainers & sales personnel, includes all aspects of utilizing the equipment such as how to turn it on & off, how to store & retrieve data, etc. One session is provided for hands-on training also in order that the members can freely use the system in front of the trainers.

·        In-service training takes place after an employee starts using the software. On installation of some software like database management system or teleprocessing, training employee before-hand is preferable to in-service training.

·        In-house training: The major benefit of providing in-house training is that instructions can be customized as per the needs of the organization. The vendors generally negotiate fees & charges that are most cost-effective in order that organizations can include more personnel in the training program. In-house training enables vendors, to understand the real time problems & suggest appropriate remedies. The disadvantages of in-house training include disturbing telephone calls, business crisis & other disruptions.
--------------------------------------------------------------------------------------------------------------------------

Q6.)    Explain the concept of inheritance and polymorphism with example.
Ans.)   Inheritance:   Inheritance is defined as a method in which the subclass inherits the properties & attributes of a class. In the process of inheritance the subclasses can be refined by adding some new attributes & functionality.

A lot of repetitive coding is there when numerous different classes supporting the same protocol are executed. Inheritance permits the sharing of the implementation of operations to most of the object-oriented systems instead of duplicate code in different classes.

By means of inheritance, one class can be defined as basically similar to another, & just the methods in which they vary can be implemented. Actually, in the starting days of object-oriented design, the use of inheritance was also known as ‘Programming by Difference’.

Some relationships are considered stronger as compare to others (like a relationship among family members is stronger than one among casual links). The strongest relationship is known as inheritance. For e.g. inheritance allows an object, known as a child, to inherit one or more of its attributes from another object, known as parent.

Polymorphism:  Polymorphism signifies the ability to influence the objects of different classes knowing just their general properties. For e.g. an operation reservation would be considered appropriately by a class illustrating a train by means of rules applicable to the railway. The same operation reservation would be considered in a different way by another class in case of airline.

Polymorphism signifies many forms. It is also known as method overriding which is defined as the ability of an object-oriented program to have various forms of the same method having the same name inside a superclass/subclass relationship. The subclass inherits a parent method & can add to it or modify it.

The same message to two dissimilar objects can generate dissimilar results. The concept that a message provides dissimilar meanings to dissimilar objects is known as polymorphism. For e.g. the message ‘Good Night’ in figure notifies the ‘Parent object to read a bedtime story, but the same message, when sent to the ‘Pet’ object, notifies the pet to sleep. The message ‘Good Night’ to the ‘child’ object notifies it to get ready for bed.


--------------------------------------------------------------------------------------------------------------------------

SMU Assignment (Sem-1) MCA1030- FOUNDATION OF MATHEMATICS

MCA1030- FOUNDATION OF MATHEMATICS

Q1.)    State Leibnitz’s theorem. Find the nth derivative of (๐‘ฅ) = ๐‘ฅ2๐‘’๐‘Ž๐‘ฅ, using Leibnitz theorem.
Ans.)    When Gottfried Wilhelm von Leibniz worked out his version of the calculus he derived the rules governing the process of differentiation (and introduced the notation that we use today). Among those rules we find a theorem concerning multiple differentiations of a product of two functions. We have before us the task of deducing the n-th derivative, with respect to the variable x, of the product of the functions f(x) and g(x).

Let u(x) = eax & v(x) = x2
U1(x) = u1 (x) = aeax, u11 (x) = u2 (x) = a2eax, u111 (x) = u(x) = a3eax.... un (x)
= un (x) = an eax
V1 (x) = v1 (x) = 2x, v11 (x) = v2 (x) = 2, v111 (x) = v3 (x) = 0,…, vn (x) = vn (x) = 0
Dny/dxn = nCUn (x) v(x) + nC1 un-1 (x) v1 (x) + nC2 Un-2 (X) V2 (X) +…+ nCn U (X) V(X)
= x2aneax+ 2nan-1xeax+ n (n-1) an-2eax
= an-2eax (x2 an+ 2nax + n (n-1))

--------------------------------------------------------------------------------------------------------------------------

Q2.)    Define Tautology and contradiction. Show that
Ans.)   a) (p^ q) v (~ p) is a tautology: - A statement is said to be a tautology if it is true for all logical possibilities. In other words, a statement is called tautology if its truth value is T and only T in the last column of its truth table.

Example: P V ¬ P

P     ¬ P     P V ¬ P
---------------------
T      F        T
F      T        T

b) (p^ q) ^ (~ p) is a contradiction: - A propositional expression is a contradiction if and only if for all possible assignments of truth values to its variables its truth value is F.

Example: P ฮ› ¬ P
 
P     ¬ P     P ฮ› ¬ P
---------------------
T      F        F
F      T        F

Usage of tautologies and contradictions - in proving the validity of arguments; for rewriting expressions using only the basic connectives.
--------------------------------------------------------------------------------------------------------------------------

Q3.)    State Lagrange’s Theorem. Verify Lagrange’s mean value theorem for the function f(x) = 3 x2 – 5x + 1 defined in interval [2, 5].
Ans.)   Let f: [a, b] = R be a continuous function such that f: (a, b) = R is differentiable. Then, there exists c = (a, b) such that f(b)-f(a)/ b-a = f1 (c).

Geometrical Interpretation

It states that given a line l joining two points on the graph of a differentiable function f, namely (a, f(a)) & (b, f(b)), there is a mean value (i.e. c = (a, b)) such that the tangent line at the corresponding point (that is, (c, f(c))) is parallel to the given line l.
Lagrange’s Mean Value Theorem State that, for any section of a continuous smooth curve, there will always be a point c at which the derivation or slope of the curve will be the same as the average curve of the section.

Theorem: f(x) = 3 x2 – 5x + 1 defined in interval [2, 5].

Solution: We have, f(x) = 3x2 – 5x + 1 where X = [2, 5]
(1) f(x) is a polynomial function, hence continuous in the interval [2, 5].
(2) f(x) is a polynomial function, hence differentiable in the interval (2, 5).
(3) f(5) = 3(5)2 – 5 * 5 + 1 = 51, f(2) = 3(2)2 – 5 * 2 + 1 = 3
Also, f1(x) = 6 x – 5 => f1(c) = 6 c – 5
Now, f1 (c) = [f(b) – f(a)] / (b-a)
Or, 6c – 5 = [f(5) – f(2)] / (5 – 2) = (51 - 3)(5 – 2) = 48/3 = 16
Or, 6c = 16 + 5 = 21 => c = 21/6 e (2, 5)
Hence, Lagrange’s mean value theorem is verified.

--------------------------------------------------------------------------------------------------------------------------

Q4.)    Define Negation. Write the negation of each of the following conjunctions:
Ans.)   An assertion that a statement fails or denial of a statement is called the negation of the statement. The negation of a statement is generally formed by introducing the word “not” at some proper place in the statement or by prefixing the statement with “It is not the case that” or “It is false that”. The negation of a statement p in symbolic form is written as “~p”.

a) Paris is in France and London is in England: -

Write p: Paris is in France & q: London is in England.
Then, the conjunction in (a) is given by p ^ q.
Now ~p: Paris is not in France, &
~q: London is not in England.
Therefore, using (D1), negation of p ^ q is given by
~ (p ^ q) = Paris is not in France or London is not in England.

b) 2 + 3 = 5 and 8 < 10: -

Write p: 2+3 = 5 & q: 8 < 10.
Then the conjunction in (b) is given by p ^ q.
Now ~p: 2+3 # 5 & ~q: 8 </ 10
Then, using (D7), negation of p ^ q is given by
~ (p ^ q) = 2+3 # 5 or (8 </ 10).

--------------------------------------------------------------------------------------------------------------------------

Q5.)    Find the asymptote parallel to the coordinate axis of the following curves
(i) (๐‘ฅ2+๐‘ฆ2๐‘ฅ − ๐‘Ž๐‘ฆ= 0: We have (x2 + y2) x – ay2 = 0
Or        x3 + (x - a) y2 = 0
Asymptote parallel to x – axis are obtained by equating to zero the coefficient of the highest power of x. Since the coefficient of highest power of x3 is 1, which is constant so there is no asymptote parallel to x – axis.
Asymptote parallel to y – axis are obtained by equating to zero the coefficient of the highest power of y. Since the coefficient of highest power of y3 is (x - a), which is constant so there is no asymptote parallel to x – axis.

(ii) x2y2– a2 (x2 + y2) = 0: We have x2y2 – a2 (x2 + y2) = 0
The coefficient of highest power of x2 of x is (y2 – a2)
Now, (y2 – a2) = (y + a) (y – a)
Hence, y + a = 0 & y – a = 0 are two asymptote parallel to y – axis
Also, the coefficient of highest power of y2 of y is (x2 – a2)
Now, (x2 – a2) = (x + a) (x – a)
Hence, x + a = 0 & x –a = 0 are two asymptote parallel to x – axis.

--------------------------------------------------------------------------------------------------------------------------

Q6.)    Define:

(i) Set: It may be observed that we describe the set by using a symbol x for elements of the set. After the sign of ‘colon’ write the characteristics property possessed by the elements of the set & then enclose the description within braces. For example, the following description of a set
A = {x: x is a natural number & 3 < x < 10}
Is read as “the set of all x such that x is a natural number & 3 < x < 10”. Hence, the numbers 4, 5, 6, 7, 8 & 9 are the elements of set A.
If we denote the sets described above in (a), (b) & (c) in roster form by A, B & C, respectively, then A, B & C can also be represented in set builder form as follows
            A = {x: x is a natural number which divides 42}
            B = {y: y is a vowel in the English alphabet}
            C = {z: z is an odd natural number}

(ii) Null Set: A set which does not contain any element is called an empty set or null set or the void set. The empty set is denoted by the symbol ‘แถฒ’.For e.g.
(a)Let P = {x: 1 < x < 2, x is a natural number}.
Then P is an empty set, because there is no natural number between 1 & 2.
            (b) Let Q = {x: x2 – 2 = 0 & x is rational}.
Then, Q is the empty set, because the equation x2 – 2 = 0 is not satisfied by any rational number x.

(iii) Subset: If every element of a set A is also an element of set B, then A is called a subset of B or A is contained in B. We write it as A ฦˆ B. For e.g.:

(a) The set Q of rational numbers is a subset of the set R of real numbers & we write Q ฦˆ R.
(b) If A is the set of all divisors of 56 & B the set of all prime divisors of 56, then B is a subset of A, & we write B ฦˆ A.

(iv) Power Set: The collection of all subsets of a set A is called the power set of A. It is denoted by P (A). In P (A), every element is a set. Example (v) of section 1.6, if A = {1, 2}, then P (A)={ แถฒ, {1}, {2}, {1, 2}}. Also note that, n [P (A)] = 4 = 22.
In general, if A is a set with n (A) = m, then it can be shown that n[P(A)] = 2m > m = n(A).

(v) Union Set: The union of two sets A & B is the set C which consists of all those elements which are either in A or in B (including those which are in both).
Symbolically, we write A แด— B = {x: x€ A or x € B} & usually read as ‘A union B’.
The union of two sets can be represented by a Venn diagram
The Shaded portion in Figure represents A แด— B.
--------------------------------------------------------------------------------------------------------------------------