0% found this document useful (0 votes)
45 views3 pages

Thiagarajar College of Engineering, Madurai 625 015. Department of Electronics and Communication Engineering

1. The document provides information about an engineering course on problem solving using computers including assessment patterns, sample questions, and programming problems. 2. Students are asked to write algorithms, code snippets, and functions to solve problems related to data structures, algorithms, and signal processing. 3. Sample problems include checking if a number is even or odd, finding factors of a number, merging arrays, and implementing filters.

Uploaded by

S Ponmalar
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)
45 views3 pages

Thiagarajar College of Engineering, Madurai 625 015. Department of Electronics and Communication Engineering

1. The document provides information about an engineering course on problem solving using computers including assessment patterns, sample questions, and programming problems. 2. Students are asked to write algorithms, code snippets, and functions to solve problems related to data structures, algorithms, and signal processing. 3. Sample problems include checking if a number is even or odd, finding factors of a number, merging arrays, and implementing filters.

Uploaded by

S Ponmalar
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/ 3

THIAGARAJAR COLLEGE OF ENGINEERING, MADURAI 625 015.

Department of Electronics and Communication Engineering

Course Code 14EC320 Course Name Problem Solving using Computers


Degree B.E Programme ECE Semester III
SET 2 Duration 3 Hrs Max. Marks 100
Candidates joined in 2014

Assessment Pattern
Remember Understand Apply Analyze Evaluate Create Total
- 20 60 20 - - 100

Answer All Questions


Part A (Understand) 10 x 2 =20
A1. Write an algorithm to check whether the given number is odd or even.
A2. List the steps involved in problem solving.
A3. Write a solution to the problem of finding largest number out of three numbers.
A4. Write the syntax of any 2 looping statements.
A5. Write the output of following code segment:
main()
{
Int a = 10, b = 10;
printf ("ans = %d", a>b?a*a:b/b);
}
A6. Given two capacitor C1 and C2 connected in series, write a function to find the
total capacitance.
A7. Write the output of following code segment:

main()
{
static int b[ ] = {10,20,30,40,50};
int i, *k;
k=&b[4]-3;
for (i = 0; i <3; i++)
{
printf ("%d",*k);
k++ ;
}
}

A8. Write a text s[15]=”read only memory”, write the algorithm to find to find its
abbreviation.

Page 1 of 3
A9. Mention the importance of dynamic memory allocation.
A10. What is the difference between opening a file in binary mode and text mode.

Part B (Apply) 5×12=60


B1. A hotel has a pricing policy as follows:
a. 2 people: Rs. 3000
b. 3 people: Rs. 4000
c. 4 people: Rs. 4500
d. Additional people: Rs. 800 per person
If the customer is staying on company business, there is a 20% discount. If the
customer is over 60 years of age, there is a 15% discount. A customer does not
receive both discounts. Apply all problem solving steps to print the cost of the
room.
OR
B2. Apply all problem solving steps to print the factors of a given number.

B3. Develop an algorithm to find the factorial of a given number and implement it
using recursive function.

OR
B4. Write a function to check whether a given number is prime or not.
B5. Develop an algorithm to remove all duplicate entries in a given array and
implement it using pointers.
OR
B6. Develop an algorithm to merge two arrays in order and implement it using
pointers.
B7. Consider a casual FIR filter of order M with impulse response h(n), n =
0,1,2,....M and input signal x(n) , n=0,1,2,....L-1. Develop an algorithm to
calculate the convolution of the input x(n) with order M filter h using direct form
given by

min(n ,M )
y(n)= ∑ h(m) x(n−m )
m=max ( 0,n−L+1 )

OR
B8. Consider a N×N matrix. Write functions to find the maximum element, minimum
element and average of elements present in the matrix. Also write a function to
arrange the elements present in an array in ascending order row wise.

B9. Develop an algorithm to search for a keyword in a given line of text and count
its occurrence.
OR
B10. Develop an algorithm to arrange the given strings in alphabetical order.

Page 2 of 3
Part C (Analyze) 1 x 20=20
C1. Hurricanes are tropical storms with very strong winds and heavy rains. The
Saffir–Simpson scale defines categories of hurricane intensity based on the
wind speed. If the storm’s winds are between 38 and 74 miles per hour, it called
a tropical storm; if the winds exceed 74 miles per hour, the storm is a tropical
cyclone, or hurricane.

Category Wind speed Storm Surge Damage level


1 74 - 95 mph 4 – 5 feet Minimal damage - 1
2 96-110 mph 6-8 feet Moderate 2
3 111 – 130 mph 9 – 12 feet Extensive damage - 3
4 131 – 155 mph 13 – 18 feet Extreme damage - 4
5 >155 mph >18 feet catastrophic damage - 5

Analyze the problem and create a structure to represent information about


hurricane.
1. Write a function to create records about hurricanes affected in Asian
countries during the year 1960-2015.
2. Write a function to display the generated records.
3. Write a function to print the number of hurricanes in each category.
4. Write a function to print information about the hurricanes that caused
catastrophic damage.
(OR)
C2. A company keeps a file of their employees in which each record has
information about employee code, name of the employee, date of joining
and salary. Analyze the problem, define appropriate data type and write
employee data into a file.
1. Read these records and display the contents on the screen.
2. Given employee code, display his date of retirement. Assume the age of
retirement to be 58.
3. List the employees whose retirement year is the current year.
4. List the employee records whose salary is in the range
25000 – 35000.

Page 3 of 3

You might also like