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

             LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034

B.Sc. DEGREE EXAMINATION – STATISTICS

FIFTH SEMESTER – APRIL 2006

                                                                   ST 5401 – C AND C ++

(Also equivalent to STA 401)

 

 

Date & Time : 17-04-2006/AFTERNOON   Dept. No.                                                       Max. : 100 Marks

 

 

PART – A

Answer all the questions.                                                                  10 ´ 2 = 20

 

  1. List the characters involved in the character set of C.
  2. How do string constants differ from character constants?
  3. Write a C program to compute the product of two given numbers.
  4. j = 1

while ( j<=4)

{

printf( “%d”, j);

j = j + 1;

}

What is the output of this program?

  1. What is an array?
  2. Define Classes.
  3. Write any two application of C++.
  4. Find errors, if any, in the following C++ statements.

cout<<”x = “ X;

cin>>x;>>y;

  1. Distinguish between private and public section.
  2. What is a function in C++?

 

PART – B

Answer any five questions.                                                                           5 ´ 8 = 40

 

  1. What are increment and decrement operators? Explain their uses with examples.
  2. When the principal, rate of interest and period of deposit are given, write a C program to compute the simple interest and the compound interest.
  3. Write a C program to find the mean of two numbers using function“.
  4. Write a C program to count the number of boys whose weight is less than 50 kgs and height is greater than 170 cm and also print their corresponding weights and heights.
  5. Explain the following conditional statements:

a). if statement            b). nested if  c). while … do and d). do while.

  1. Define overloaded functions to display two and three values.
  2. Write a C++ program to find the largest of given n positive numbers
  3. Write a C++ program to arrange a set of n values in the ascending order

PART – C

Answer any two questions.                                                   2 ´ 20 = 40

 

  1. a). The mean and variance of a set of n values x1,x2,…,xn are given by the formulas

Mean = Sxi / n

Variance = (1/n) Sxi2 – (Sxi /n)2

Write a C program to find the mean and variance.

b). Explain switch statement and give an example.                                (12 + 8)

  1. a). Write a C program for raising a whole number to a power with help of function.(Raising the value i to power j is denoted as i j in Mathematics).

b). Explain two-dimensional array and give an example.                       (13 +7)

 

  1. a). If the annul gross income of a person exceeds Rs.20,000,  he has to pay 25% of his income tax and 7% of his gross-income as profession tax. Otherwise, he has to pay 15% of his gross-income as income tax and 5% of his gross-income as profession tax.  Write a C++ program to read in the gross-income of a person and calculate the income tax and the profession tax to be paid by him.

 

b). A bank provides an interest of 10% on deposits up to Rs.8000, 12% for deposits between Rs.8001 and Rs.12000 and 15% for deposits above Rs.12000.  Write a program to calculate one year’s interest for a given deposit amount according to the above rules.                                                          (10 +10)

  1. a). Write a  C ++ program to find out whether a given number   n   is a prime number .

b). Write a C++ program to perform addition, multiplication and division of two numbers using class concept.                                                    (6+14)

 

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