Loyola College M.Sc. Statistics April 2003 Programming Languages Question Paper PDF Download

 

LOYOLA  COLLEGE (AUTONOMOUS), CHENNAI-600 034.

M.Sc. DEGREE EXAMINATION – STATISTICS

second SEMESTER – APRIL 2003

ST   2803/  S  818   programming languages

28.04.2003

1.00 – 4.00                                                                                          Max: 100 Marks

 

PART A                               (10 ´ 2 = 20 Marks)

Answer ALL the questions

  1. What is the output of the following program?

#  include < iostream. h>

void main (  ).

{  int x, y, z;

x =10;

y = x++;

z = ++y;

cont <<y <<z; }

  1. Explain the switch structure.
  2. Write a program to get the output as

 

1      2        3       4        5

 

2     3       4        5

 

3      4       5

 

  • 5

 

5

  1. Write a recursive program to get the factorial of a number.
  2. What is prototyping?
  3. What is encapsulation?
  4. Explain destructor.
  5. What is a pointer variable?
  6. What is the use of the dot operator and scope resolution operator while using

a class?

  1. Explain strcpy ( ), strcat ( )

 

PART B                    (5 ´ 8 = 40 Marks)

 Answer any FIVE questions.

  1. Explain constructors with examples.
  2. Explain structures with examples.
  3. Write a program to find the largest element in a matrix.

 

 

 

 

  1. Illustrate how runtime polymorphism is achieved with the help of virtual functions.
  2. Explain the following
  3. i) ios : : in,    ii) ios :  : out       iii) ios :  : ate   iv) ios :  : no create
  4. v) ios: : bin vi) ios : : no replace.                                                              (6 ´ 1 ½)
  5. Illustrate the use of default arguments.
  6. Illustrate with an example the use of friend functions.
  7. Explain with an example passing objects as arguments.

PART C                                       (2 ´ 20 = 40 Marks)

Answer any TWO questions

 

  1. a) Using Trapezoidal rule, write a program to evaluate

 

  1. Write a program to find without using a separate function for factorials

Sin x  =                                    (10 +10)

with an error  .0001 between the consecutive terms.

 

  1. Explain the concept of function overloading and operator overloading

with examples.                                                                                        (5 +15)

 

  1. Explain the concept of simple inheritance, multiple inheritance and multilevel

inheritance with examples.                                                                    (4+8+8)

 

  1. Write an interactive menu driven program that will create a data file containing

the  telephone numbers and names of the customers and implement the

following tasks.

  1. Determine the telephone number of a given person.
  2. Determine the name if a telephone number is known.
  • Update the telephone number whenever there is a change. (20)

 

 

Go To Main page

 

 

© Copyright Entrance India - Engineering and Medical Entrance Exams in India | Website Maintained by Firewall Firm - IT Monteur