Eeeb Labevln2 Set1

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Amrita School of Engineering, Coimbatore-641112

Department of Computer Science and Engineering


19CSE102 COMPUTER PROGRAMMING
Lab Evaluation-2
Date: 28.06.2023 Time: 1 hour 15 minutes
Class: EEE-B Maximum: 20 Marks

Course Outcomes

CO 1: Understand the typical programming constructs: data (primitive and compound),


control, modularity, recursion etc. thereby to understand a given program
CO 2: Understand and analyze a given program by tracing, identify coding errors and
debug them
CO 3: Make use of the programming constructs appropriately and effectively while
developing computer programs
CO 4: Develop computer programs that implement suitable algorithms for problem
scenarios and applications

---------------------------------------------------------------------------------------------------------------------
SET – 1
Question 1:
There are two string arrays Country and Capital (2D character arrays)- the first one stores the
Country names and the second one stores corresponding capital city names. For example, if the
first string in Country is “India”, the first entry in Capital will be “New Delhi”. Write a C
program that contains a function to print the name of the country/countries, whose Capital City
name is the longest name in the Capital String array. For example, if Country = {“Angola”,
“Belarus”, “Canada”} and Capital = {“Luanda”, “Minsk”, “Ottawa”}, the function should
display both Angola and Canada as both of their capitals are 6-letters long are the largest ones in
the Capital Array. [CO4 BTL-3, 10 Marks]

Question 2:
Write a C program to find the products digits of a number using recursion. (Example digit 123,
answer 6)
[CO4 BTL-3, 10 Marks]
Rubrics for Evaluation:

Rubrics

Q1 – Implementation (8) Q2 – Implementation (8) Output(2+2)

0 – Not done 0 – Not done 0 - Not done


2 – Menu usage 2 – Reading the input 1 – Partial Output
2 – Function Usage 2 – Function Usage 2 – Full Output
4– Correct and complete
4– Completion logic  

*****

You might also like