Thanks to visit codestin.com
Credit goes to www.scribd.com

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

MCA TermEndPracticalExam Set1

mca qp1

Uploaded by

priya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views4 pages

MCA TermEndPracticalExam Set1

mca qp1

Uploaded by

priya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Directorate of Online Education

Manipal University Jaipur


Term Practical Examination 2021

Program: MCA
Subject: Programming in C – Practical
Course Code:
Set No: 1
Maximum Marks: 30
Prepared by: Dr Priyanka Mathur

PRACTICAL EXAM INSTRUCTIONS -

1. The External practical examination contains 2 questions.


2. Appropriate marks will be awarded for each correct step.
3. All questions need to be attempted.

Problem 1

Exercise Objective: To check the understanding of the learner regarding correct


application of looping constraints.

Problem Statement 1: Write a program to print the multiplication table of a given


number.

Instructions:

 Write proper comment to make your code readable.


 Use proper naming convention for variables etc in your code.
 Ensure your code compiles without any errors/warning/deprecations
 Avoid too many & unnecessary usage of white spaces (newline, spaces, tabs, …)
 Always test the code thoroughly, before saving/submitting exercises/project.

Expected Output: Print the multiplication table in correct format.

Test cases:

Sample Input Sample Output


5 5*1=5
5 * 2 = 10
.
.
.
5 * 10 = 50
6 6*1=6
6 * 2 = 12
.
.
.
6 * 10 = 60

Problem 2

Exercise Objective: To check the correct usage of pointers.

Problem Statement 2: Write a program in C to store n elements in an array and print


the elements using pointer.

Instructions:

 Write proper comment to make your code readable.


 Use proper naming convention for variables etc in your code.
 Ensure your code compiles without any errors/warning/deprecations
 Avoid too many & unnecessary usage of white spaces (newline, spaces, tabs, …)
 Always test the code thoroughly, before saving/submitting exercises/project.

Expected Output: The learner should be able to store and print the array values
through pointers.

Test cases:

Sample Input Sample Output


Input the number of elements to store in the The elements you entered are :
array :5 element - 0 : 5
Input 5 number of elements in the array : element - 1 : 7
element - 0 : 5 element - 2 : 2
element - 1 : 7 element - 3 : 9
element - 2 : 2 element - 4 : 8
element - 3 : 9
element - 4 : 8
Viva Questions

Q1. Why is C known as a mother language?

Q2. What are the 3 parameters that are necessarily given for correct execution of a for loop?

Q3. What is the difference between while and for loop?

Q4. What is the usage of the pointer in C?

Q5. What is a NULL pointer?

Q6. What is the difference between the local variable and global variable in C?

You might also like