0% found this document useful (0 votes)
31 views2 pages

MCS 201 9

Uploaded by

somesh rai
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)
31 views2 pages

MCS 201 9

Uploaded by

somesh rai
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/ 2

Course Code : MCS-201

Course Title : Programming in C and PYTHON


Assignment Number : PGDCA_NEW(I)/201/Assignment/2023
Maximum Marks : 100
Weightage : 30%
Last Date of Submission : 30thApril 2023 (for January Session)
31st October 2023 (for July Session)

There are sixteen questions in this assignment (eight in each section i.e. Section A and
Section B) which carries 80 marks. Each question carries 5 marks. Rest 20 marks are for
viva-voce. Answer all the questions from both the sections i.e. Section A and Section B. You
may use illustrations and diagrams to enhance the explanations. Include the screen layouts
also along with your assignment responses. Please go through the guidelines regarding
assignments given in the Programme Guide for the format of presentation.

SECTION-A (C-Programming)

Q1: Compare flowchart and algorithm. Write Algorithm and also draw flowchart to perform
following:

a. Find factorial of a number entered by user.


b. Print Fibonacci series up to the number of terms entered by the uses

Q2: Differentiate between Recursion and Iteration. Give suitable code to find factorial of a number
entered by user in C for each.

Q3: Explain the concept of call by reference, with suitable code in C for each. Give advantage and
disadvantage of call by reference

Q4: Write an algorithm to find the HCF (Highest Common Factor) of the two numbers entered by a
user. Transform your algorithm into a C program, support your program with suitable comments.

Q5: Briefly discuss the relation between pointers and arrays, giving suitable example. Write a
program in C, to print transpose of a 2D matrix entered by a user. Also give comments.

Q6: Write the syntax of looping control statements. Also draw the flowchart for each statement. Write
a program in C to generate the following pattern :
*
**
***
Q7: Differentiate between Random access and Sequential access of files in C. Discuss the syntax and
role of fseek( ) and rewind( ) function, while accessing any file.

3
Q8: Compare any two of the following (give suitable C code for each) :

c. Break and Continue Statement


d. Structure and Union

SECTION-B (PYTHON-Programming)

Q9: What is C-Python ? Briefly discuss the relation between framework, library, package and module
in Python.

Q10: Differentiate between mutable and immutable data types in Python. Briefly discuss the following
data types of Python :

e. Lists
f. Tuples
g. Dictionary

Q11: What is the utility of map( ) function do ? Write a program in Python to print the square of the
numbers present in the list, by using map( ) function.

Q12: Compare overloading and overriding in Python. Give suitable example code for each in Python.

Q13: Write Python code to perform the following :

h. Reading data from a file


i. Creating a file and add content to it

Q14: What are Lambda functions ? How do Lambda functions differ from Built-in functions ? Write
lambda function to calculate cube of a number. Also write the program to find cube of a number
without using lambda function.

Q15: Differentiate between the following with the help of suitable example for each :

j. Co-routines and subroutines


k. Co-routines and threads

Q16: What are Cursor Objects ? Briefly discuss the utility of cursor objects. Write Python code for a
cursor to execute the SQL query, to print the version of database. Support your program with
suitable comments.

You might also like