Exam Details

Subject lab ii — (c++ programming)
Paper
Exam / Course b.sc. (cs)/b.sc. (cs) (lateral)
Department
Organization Alagappa University Distance Education
Position
Exam Date May, 2016
City, State tamil nadu, karaikudi


Question Paper

DISTANCE EDUCATION
B.Sc. (CS)/B.Sc. (Lateral) DEGREE EXAMINATION,
MAY 2016.
LAB II — PROGRAMMING
(2007 onwards)
Time Three hours Maximum 100 marks
• Examiner has to select ONE question and give it to
the student by LOT system.
• Each sub division carries 50 marks.
1. Write a program to reverse the sentence and
find the given sentence is palindrome or not.
Create a class for a stock item abstract data
type. It should have the attributes of stock levels
(an integer) and unit price float). Define the
methods to return the values of these two attributes
and to set them using parameters. Add two more
methods to allow stock receipts and issues updating
the stock level as appropriate. Write a menu driven
program to solve the problem.
2. Wire a menu driven program to add and
subtract given two matrices of order m n defined
in class. Using operator overloading.
Write a program which will accept a string of
10 characters in length from the keyboard and
count the occurrences of each of the five vowels in
the string. The o/p should be in a (tapped) format
similar to this example.
A E I O U
0 1 0 0 1
Sub. Code
26
Cut here
DE-9169
2
WK 6
3. Assumes you want to generate a table of multiples
of any given number. Write a program that allows
the user to enter the number, and then generates
the table, formatting it into ten columns and
20 lines.
Create a class called employee that contains a name
and an employee number. Include a member
function called getdata( to get data from the user,
another function called putdata( to display the
data. Write a main( program to exercise this class.
It should create an array of type employee and then
invite the user to input data for n employees.
4. Using dynamic constructors, write a program
to concatenate two given strings.
Create a class INT to overload all five integer
arithmetic operators and so that they
operate on objects of type INT. If the result of any
such arithmetic operation exceeds the normal range
of int's from 768 to 32, 767 have the operator
print a warning and terminate the program. Write a
program to test this class.
5. Using pointers create a class and Write a
program to get the n names and display them in
sorted order.
Create a equivalent of four function calculator. The
program should request the user to enter a number,
an operator, and another number. It should then
carry out the specified arithmetical operations:
adding, multiplying, subtracting and dividing the
two numbers. Finally it should display the result.
When it finishes the calculation) the program
should ask if the user wants to do another
calculation.
Cut here
Cut here
DE-9169
3
WK 6
6. Create a class employee contains a Employee
number, Employee name and address. Write a
menu driven program to get the number of
employee details and display all details in employee
namewise in sorted order.
Write a program that reads a group of numbers
from the user and places them in array of type float.
Once the numbers are sorted in the array, the
program should average them and print the result.
Use pointer notation whenever possible.


Subjects

  • application programs
  • computer graphics
  • internet programming
  • lab ii — (c++ programming)
  • lab iii — application programs
  • lab iv (visual basic and oracle)
  • lab v — java programming
  • object oriented programming and c++
  • operating systems
  • rdbms
  • visual programming