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

CSE 1051 Problem Solving Exam Guide

Uploaded by

sindhoora nayak
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)
66 views2 pages

CSE 1051 Problem Solving Exam Guide

Uploaded by

sindhoora nayak
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

Reg. No.

I SEMESTER [Link]. (ALL BRANCHES)


END SEMESTER EXAMINATIONS, MARCH 2021
SUBJECT: PROBLEM SOLVING USING COMPUTERS [CSE 1051]
REVISED CREDIT SYSTEM
(13/03/2021)
Time: 3 Hours Max. Marks: 50

Instructions to Candidates:
• Answer ALL questions & missing data may be suitably assumed.

1A i. Explain four classifications of computational problems. 2M


ii. Explain all the steps (phases) in a C program development with a neat diagram. 3M
1B Write a flowchart to display perfect numbers between 1 and 500. 3M
1C Write a C program to read N positive integers without using arrays and functions to find the 2M
second largest number among them.
2A Explain the various Bitwise operators with proper example. 5M
2B Write a program to search nth Fibonacci indexed number from the given list of 1D array. 3M
Ex: 1 D Array-- 34, 21, 11, 18, 21, 81, 57, 69, 97, 24
4th Fibonacci number i.e. 2, so fetch array [2] =11
Fibonacci series: 0, 1, 1, 2, 3, 5, 8……….
2C What is the largest number of key comparisons made by binary search in searching for a key 2M
in the following array? Show all the steps.
3 4 27 31 39 42 55 70 74 81 85 93 98
3A Write a single program to i) sort ‘n’ strings using selection sort method. 5M
ii)Eliminate the duplicate strings in the sorted list. [Do not use any additional array]
3B i. List the different ways of initializing pointers. Illustrate with examples. 2M
ii. Write a code snippet to swap the contents of two pointers. Note that the content of pointers 1 M
are addresses. Assume integer pointers.

3C Differentiate between function declaration and function definition. Give the general syntax 2M
for defining a function

CSE 1051 Page 1 of 2


4A Write a C program to read a matrix of size MxN and display. The program must find and 5 M
display the location of all the elements in the matrix which are both the largest element in its
column and the smallest element in its row. Replace all such elements with the row average.
If no such elements exist, then display appropriate message.
1 2 3
4 5 6
7 8 9
4B With appropriate example program code, explain how to return multiple values from a 3M
function using pointers.
4C Write a complete C program to read and print a string using pointer. 2M
5A Write a C program to read a 2-dimensional integer array (matrix) arr of order m×n and
display the array. Use a recursive function rSoD(int)to find the sum of digits of an odd
element (value) from the array read above and replace the element with its sum. Using pointers
write another function dec2Bin (int *) that takes as a parameter the sum of digits of odd 5 M
elements computed above, replace it with its binary equivalent in the same 2-dimensional
array, and display the array in matrix form in the main program.
5B Define a structure EMPLOYEE with the following members: Employee_Number,
Employee_Name, Basic, DA, IT, Net_Sal. Write a C program to read data of N employees
and print the same. Compute DA, Gross, and Net_Sal of each employee and print them. (DA 3 M
= 52% of Basic, gross=Basic + DA, and Income Tax (IT) = 30% of the gross salary,
Net_sal=gross-IT).
5C Explain any four classifications of cyber-crime where computers are used to commit the 2M
crime.

CSE 1051 Page 2 of 2

You might also like