Monday, October 5, 2015

PGDCA Gauhati University PROGRAMMING IN C++ AND DATA STRUCTURE 2008 Question Paper

Gauhati University
Post Graduate Diploma Computer Application 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.
Share This
Previous Post
Next Post

B.E Civil Engineer Graduated from Government College of Engineering Tirunelveli in the year 2016. She has developed this website for the welfare of students community not only for students under Anna University Chennai, but for all universities located in India. That's why her website is named as www.IndianUniversityQuestionPapers.com . If you don't find any study materials that you are looking for, you may intimate her through contact page of this website to know her so that it will be useful for providing them as early as possible. You can also share your own study materials and it can be published in this website after verification and reviewing. Thank you!

0 comments:

Pen down your valuable important comments below

Search Everything Here