Professional Documents
Culture Documents
First Semester
Internal Assessment for Theory has already been mentioned in the Introductory
Booklet of PGDCA as below –
For theory internal assessment any ten questions from review questions provided at the
end of each lesson in the lesson scripts (at-least one question from each lesson) be
selected and answers be written and be submitted to the Chairperson, University School
of Open Learning, Panjab University, Chandigarh by 30th November, 2017.
The documentation and soft copy of solutions of the assignments enclosed be submitted
to the Chairperson, University School of Open Learning, Panjab University, Chandigarh
by 30th November, 2017.
The First Semester Practical Examinations will be conducted in the First week of
December 2017 and First Semester Theory Examinations will be conducted in the Second
week of December 2017.
1
Assignment (First Semester) 2017 - 2018
Class: PGDCA {University School of Open Learning}
Subject: PGD – PR 1105 Computer Fundamentals (PGD-1101) Lab1.
(b) Compute and display the retirement date assuming retirement age is 60
years.
(b) Display the number of characters, words and lines in the file.
(c) to display the user names, along with the processes they created.
2
Assignment (First Semester) 2017 - 2018
Class : PGDCA {University School of Open Learning}
Subject : PGD – PR 1105 Computer Programming using C (PGD-1102) Lab 1
Problem 1
a) Write the function oddsum() in C with function head
int oddsum(int n)
The function should return the sum of all odd numbers between 1 and n (including 1 and
n), and you may assume that n>=1). For example, the call oddsum(7) should give the
result 1+3+5+7=16 while the call oddsum(12) should give the result 1+3+5+7+9+11=36.
b) Write a main function that tests oddsum() by reading an integer from the keyboard,
and if the integer is positive oddsum() should be called and the returned value is
written on the screen.
Problem 2
Write a function in C with name magic and the input parameters A and n. A is an
integer matrix of order n. The function should check if the matrix A fulfils the condtions
for being a magic square. It should return the magic number if A is “magic”. Otherwise
zero should be returned. The function should be able to handle matrices declared
int matA[10][10].
int magic(int A[][10], int n)
i.e. all row sums, all column sums and both the diagonal sums should be equal to say that
the matrix is a magic square.
Problem 3
3
At /* */ a call to mixtra is done.What is written by the program if the call is:
a. mixtra(a,&b);
b. mixtra(b,&a);
c. mixtra(a,&a);
d. mixtra(a,c);
Problem 4
Explain what the recursive function below does. Do not describe, row by row, what the function
does, rather you should explain what problem the function solves.
" "
Illustrate your explanation by showing what happens when the function is called by
secret(12)
Problem 5
A palindrome is a string that sounds the same independent of it is read from left to right or from
right to left. The examples of palindromes are: “abba”, “otto”, “123321”, “I am ma i”, “C”,
“Anna”. Write a function in C++ that takes a string as the single parameter and returns the integer
1 if the string is a palindrome. Otherwise zero should be returned. Extend this program to read a
paragraph from a file and then find out the palindromes in that paragraph.
Problem 6
Write a program in C++ to create the following report. Create a class student and add functions
setData, getData, and showData to set, read, and display values. The output should appear as
shown below:
4
List of PGDCA students
5
Assignment (First Semester) 2017 – 2018
Class: PGDCA {University School of Open Learning}
Paper Code: PGD – PR- 1106 Practical DBMS - Lab2.
Write either SQL code or the FoxPro program / programs to answer the following
queries.
Create above tables, add rows to tables and answer the following business queries.
1. List the employees arranged department number wise and then by name.
2. List all designation codes from EMPLOYEE omitting duplicates.
3. Who is the highly paid employee in the company ?
4. Which managers have salary between Rs. 4000 and Rs. 5000 ?
5. List all managers who are not in dept_no ‟01‟ and whose name begin with„G‟.
6. Which clerks were hired in or after Mar-2000 ?
7. Which employees, when starting their careers, either were not programmers at
first or had starting salaries of atleast Rs. 5000 ?
8. What is the maximum, minimum, and average salary of male & female
employees ?
9. List the name, annual salary, commission, and total annual income for each
employee arranged in descending order of their income.
10. List the employees who have the same job as that of „Surinder‟.
11. Which women employees earn more than average salary of men ?
12. What is the name of employee Sonia‟s department manager ?
13. Which employees have ever got promotion into a managerial job ? Show their
EmpNo, name and Current Job.