CS 1
Any one experiment out of the following will carry 30 marks and Journal carries 15 Marks
and 5 marks are for viva based on experiment performed.
SR EXPERIMENT NAME
NO.
C++
01 Write a program in C++ that first initializes an array of given 10 real numbers.
The program must sort numbers in ascending/descending order using Bubble –
Sort method. It should print the given list of numbers as well as the sorted list.
02 Write a program in C++ that first initializes an array of given 10 sorted real
numbers. The program must verify whether a given element belongs this array or
not, using Binary – Search technique. The element (to be searched) is to be
entered at the time of execution. If the number is found, the program should print
its position in the array otherwise it should print “The number is not found.”
03 Write a program in C++ that first initializes an array of five given numbers (short
/float/ double). The program must add these numbers by traversing this array with
a pointer. The output should print the starting address of the array with the size of
the number (in bytes) to which it points. The program must also print the sum and
pointer address with addition of every number as well as the ending address.
04 Write a program in C++ that initializes a Ratio class with no parameters as a
default constructor. The program must print the message “OBJECT IS BORN”
during initialization. It should display the message “NOW X IS ALIVE’’, when
the first member function Ratio x is called. The program must display “OBJECT
DIES” when the class destructor is called for the object when it reaches the end of
its scope.
05 Implement a Circle class in C++. Each object of this class will represent a circle,
storing its radius and X & Y coordinates of its center as floats. Include a default
constructor, access functions an area() and circumference() of circle. The program
must print coordinates with radius, area and circumference of the circle.
06 Write a C++ program using virtual function. The program must declare p to be a
pointer to objects of the base class Person. First, the program must assign p to po
int an instance X (name of the person eg. “BOB”)
of class person. The program must then assign p to point at an instance y( name
of the student, eg. ”Tom”) of the derived class Student.
Define a print () in the base class such that it invokes the same base class function
to print the name of the person by default. The second call for the same should e
voke the derived class function to print the name of the student.
07 Write a program in C++ to read the name of a country from one text file and
name of its corresponding capital city from another text file. The program must
display the country name and indicate its corresponding capital (for at least five
countries) in the output
HTML
08 Create a simple HTML page on any of the following topics: College Profile,
Computer Manufacturer or Software Development Company. The page must
consist of at least 3 paragraphs of text. The page must have an appropriate title,
background color or background image, and hyper-links to other pages. The
paragraphs must have text consisting of different colors and styles in terms of
alignment and Font Size.
09 Create a simple HTML page on any of the following topics: College Profile,
Computer Manufacturer or Software Development Company. The page must
consist of a scrolling marquee displaying an appropriate Message. The page must
include a table with at least 5 rows and 3 columns having merged cells at least at
1 place. The page must also display an image, such that when the same is viewed
through a browser and the mouse is placed (hovered) on the Image, an
appropriate text message should be displayed. The image itself should also act as
a hyper-link to another page.
10 Create a simple HTML page on any of the following topics: College Profile,
Computer Manufacturer or Software Development Company. The page must
consist of at least 3 paragraphs of text. The page must have an appropriate title,
background color or background image, and hyper-links to other pages. The
paragraphs must have text consisting of different colors and styles in terms of
alignment and Font Size.