How To Exam?

a knowledge trading engine...


Gauhati University 2008-1st Sem Post Graduate Diploma Computer Application PGDCA ester, -III - Question Paper

Monday, 21 January 2013 07:05Web

2008
PROGRAMMING IN C++ AND DATA STRUCTURE
THIRD PAPER
Full Marks : 70
Time :3 hours
The figures in the margin indicate full marks for the ques.
1. (a) Draw a flowchart to learn n integers and print the sum of the positive and
negative integers separately. 8
(b) define the various parts of a function in C++ with the help of a suitable
example. 4
(c) What do you mean by default constructor and parameterized constructor? 3
2. Write down the outputs of the subsequent C++ statements:
(a) for (i= 1; i<2; i++)
cout<< “PGCS, GAUHATI UNIVERSITY”; 2
(b) for (i=10; i<10; ++i);
cout<<”PGCS, GAUHATI UNIVERSITY”; 2
(c) char str[50] = “ASSAM”;
str[1] = ‘A’;
cout<(d) char arr[30] = “Brahmaputra”;
int 1;
1 = strlen(arr);
1--;
while (1>=0)
{
cout<1--;
} 3
3. provide answers to any 5 of the subsequent questions: 5×5=25
(a) Write a program in C++ to display all the numbers divisible by five ranging from
a range, whose starting value and the ending values are to be provided as
input by the user.
(b) Write a function in C++ to return the minimum of an array of integers,
which takes the array and its size as parameters.
(c) Write a function in C++ to implement the binary search technique for
sorted array of integers.
(d) What do you mean by variable? Write down the rules for naming a
variable in C++.
(e) elaborate the advantages of using loops? define the syntax of the ‘for’
loop and ‘while’ loop.
(f) discuss the linear search technique for an ordered array with the help of
an example.
(g) Write a function in C++ which returns the length of the string passed as
parameter to it. [Do not use the ‘strlen()’ library function]
4. provide answers to any 3 of the subsequent questions: 7×3=21
(a) define the use of the subsequent functions with the help of an example:
(i) Strlen()
(ii) Clrscr()
(iii)Strcpy()
(b) Write a program in C++ which will learn 2 strings from the user and
concatenate the strings into a 3rd string.
(c) Create a class called “book”, whose data members are (i) book_name, (ii)
book_no, (iii) author, (iv) price. Write 2 member functions, 1 to learn
the info of a book and a different to display the info of a
book.
(d) Using a class definition, show how to implement a singly linked list. Write
functions for inserting elements at the starting and ending positions of a
linked list. Also write a function to traverse through a linked list.
(e) What is function overloading? discuss with a suitable example.


( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Gauhati University 2008-1st Sem Post Graduate Diploma Computer Application PGDCA ester, -III - Question Paper