0% found this document useful (0 votes)
789 views4 pages

MCS 201

This document is a past exam paper for the Post Graduate Diploma in Computer Applications (PGDCA) program. It contains 8 questions on various topics related to programming in C and Python. The exam is 3 hours long and carries a maximum of 100 marks with a 70% weightage. Question 1 is compulsory and students must attempt any 3 questions from the remaining questions. The questions cover topics such as Fibonacci series, data structures in C, operators in C, palindrome strings, modules and packages in Python, generators and iterators in Python, coroutines in Python, slope of a line, Pandas and CSV files, loops and functions in C, MySQL connector, matrix multiplication, lists vs arrays in Python,
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
789 views4 pages

MCS 201

This document is a past exam paper for the Post Graduate Diploma in Computer Applications (PGDCA) program. It contains 8 questions on various topics related to programming in C and Python. The exam is 3 hours long and carries a maximum of 100 marks with a 70% weightage. Question 1 is compulsory and students must attempt any 3 questions from the remaining questions. The questions cover topics such as Fibonacci series, data structures in C, operators in C, palindrome strings, modules and packages in Python, generators and iterators in Python, coroutines in Python, slope of a line, Pandas and CSV files, loops and functions in C, MySQL connector, matrix multiplication, lists vs arrays in Python,
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

No.

of Printed Pages : 4 MCS-201

POST GRADUATE DIPOLOMA IN


COMPUTER APPLICATIONS
(PGDCA) (NEW)
Term-End Examination
December, 2022
MCS-201 : PROGRAMMING IN C AND PYTHON

Time : 3 Hours Maximum Marks :100

Weightage : 70%

Note : Question No. 1 is compulsory. Attempt any


three questions from the rest.

1. (a) Draw flowchart and write algorithm to


print Fibonacci series upto the number of
terms entered by the user. 5

(b) Differentiate between the structure and


union construct in C. Write suitable code
for each. 5

(c) Compare the term typedef and typecast in


C. Give suitable code for each. Also discuss
utility of both. 5

P. T. O.
[2] MCS-201

(d) Write a program in C to verify that the


string entered by the user is palindrome or
not. Support your program with suitable
comments. 5
(e) What is Jython ? How does Jython work ?
Compare module and package in context of
Python. 5
(f) What are generators in Python ? Compare
generators and lists. Also discuss utility of
generators in Python. 5
(g) What are iterators in Python ? How do
iterators differ from iterables ? Give
example of each. 5
(h) What are co-routines ? How do co-routines
support cooperative multitasking in
Python ? 5

2. (a) Write an algorithm to find the slope of a


line segment whose end point coordinates
are (x 1 , y 1 ) and (x 2 , y 2 ). The algorithm
gives output whether the slope is positive,
negative or zero. Transform your algorithm
into C program. 10
Note : Slope of line segment = (y 2 – y 1 )/
(x 2 – x 1 ).
[3] MCS-201

(b) What are Pandas ? Write steps to import,


read and print a CSV file using Pandas.
Also, transform your steps in to suitable
code in Python. 10

3. (a) Write short notes on the following : 10


(i) Looping constructs and its types in C
(ii) Functions and its types in C
Give suitable example for each.
(b) Discuss the connect( ) method of MySQL.
Connector interface. List the arguments
involved with connect( ) method. Write
Python code to create database
student_DB and to connect to student_DB
(make suitable assumptions wherever
necessary). 10

4. (a) Write a program in C to calculate the


product of two matrices. Support your code
with suitable comments. 10
(b) What are lists ? How do lists differ from
arrays ? What do you understand by the
term “Lists are mutable but tuples are
immutable” ? Write syntax for creation of
list and accessing the last element of the
list. 10

P. T. O.
[4] MCS-201

5. (a) Briefly discuss the concept of “Call by


value” and “Call by reference”. Give
example code in C for each. Support your
code with suitable comments. 10

(b) Write Python code to perform the


following : 10

(i) Copy a file first.txt to second.txt

(ii) Reading a file

(iii) Writing to a file

(iv) Appending content to a file

MCS–201

You might also like