Loyola College B.Sc. Statistics Nov 2006 C And C ++ Question Paper PDF Download

                         LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034

B.Sc. DEGREE EXAMINATION – STATISTICS

AB 10

FIFTH SEMESTER – NOV 2006

ST 5401 – C AND C ++

(Also equivalent to STA 401)

 

 

Date & Time : 06-11-2006/9.00-12.00   Dept. No.                                                       Max. : 100 Marks

 

 

Part A

Answer all the questions.                                                                        10 X 2 = 20

 

  1. What are the special characters in C?
  2. Distinguish between string and character constants.
  3. Explain briefly increment operator with an illustration.
  4. Explain briefly “if…else” statement with an illustration in C.
  5. What is the output of the following?

int x = 0;

for (i=1; i<=5; i++)

{

x+=i*i;

printf(“%d”,x);

}

What will be the output when the above segment is executed?

  1. What are the logical expressions in C programming?
  2. int y =0, int k;

for (i=10; i>1; i++)

{

k=i*i;

cout<<k<<endl;

}

What will be the output when the above segment is executed?

  1. Write a C++ program to display the following output using a single cout statement.

Maths = 98

Physics=79

Statistics=99

  1. Define class.
  2. Define encapsulation.

 

 

Part B

Answer any five questions.                                                               5 X 8 = 40

 

  1. Electricity charges are levied in a state according to the following schedule.

Number of Units consumed                Rate / Unit

0 – 99                                      Rs. 1.50

  • 2.50

300 – 499                                Rs. 4.00

500 & above                            Rs. 5.00

Write a C program to prepare the electricity bill, when the number of units

consumed by a customer is given.

  1. Write a C program to find out the largest number from the three given numbers using an user-defined function.
  2. Explain the following control statement in C programming with an example.

a). do while

b). for statement.

  1. Explain one-dimensional arrays and write any one program of your choice in C with help of the same.
  2. Write a program to find perimeter and area of circle with help of function.                             ( note: area=pr2 and perimeter = 2pr)
  3. Calculate mean for the following data with help of C++ program.

X: 10   20        30        40        50        60        70        80        90        100

F:  2     8          9          15        25        40        30        20        18        10

  1. In a company the health insurance premium is deducted from salary as given in the following table:

Category                    Amount deducted (in %)

Single                                      9.75

Married without children        16.25

Married with children             24.50

Write a C++ program to receive as input the salary and category of a person and

calculate his insurance premium.

  1. Write C++ program to calculate standard deviation for N values using array in Class.

 

Part C

Answer any two questions.                                                               2 X 20 = 40

 

  1. a). Explain different types of constants and their rules in C programming.

b). Write a C program to calculate mean and variance for N values with the help of arrays.                                                                                                         (10+10)

  1. a). Write a C++ program to calculate sum of two matrices of order N X N.

b). When the principal, rate of interest and period of deposit are given, write a c

program to compute the simple interest and compound interest.          (10+10)

  1. a). Explain function overloading.

b). Write C++ program to calculate area of a triangle with help of function

overloading when (i) two sides and (ii) three sides are known.               (5+15)

  1.  Write a C++ program to calculate correlation coefficient of two variable X and Y

and also display mean of X and Y using the concept of class.                (10+5+5)

 

 

Go To Main page

 

Latest Govt Job & Exam Updates:

View Full List ...

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