You are on page 1of 3

CSE 1002 :( Problem Solving and Object Oriented Programming)

SCHOOL OF ELECTRONICS ENGINEERING (SENSE)

CAT 1 EXAM: TEAM B Questions

Follow the instructions: (Answer all the Questions)


 Write your Team Name Details, Registration number & Name at
the top of each answer sheet.
 Don’t share your code or answers with your friends (Very Very
Important).
 Copy and paste the code in the answer sheet and attach the
screenshot of the code with output for verification.
 Beware of Plagiarism (Don’t copy-paste the code: Understand &
write in your own way).
 Print all the possible Expected Outputs.
Question 1:
Write a C programming to create an array and store the values,
using the function to Sort the array (Without using keywords) and
print of even and odd numbers separately, and find sum and
average.

• Note: Use Function with arguments & with return value


method.

Example

Enter total no of Array Size: 5


Enter the Array Input data: 44 29 11 35 65

Expected Output :

Sorted array (ascending order): 11 29 35 44 65

Sorted array (descending order): 65 44 35 29 11

Print Even and odd numbers separately.


Add even numbers and find the average.
Add odd numbers and find the average.

Page 1 of 3
CSE 1002 :( Problem Solving and Object Oriented Programming)
SCHOOL OF ELECTRONICS ENGINEERING (SENSE)

Question 2:

Write a C Program to get input from the user [max 10 inputs] using
an array.

Task:

 Reverse the array.

 Insert a new Element to a Specific Position in an Array.

 Delete Element to Specific Position in an Array.

 Find 3 Least and 3 maximum elements.`

Expected Output:

Enter the array size: 10

Enter the Array Elements: 8 0 9 6 9 8 1 5 3 7

Array in Reverse order: 7 3 5 1 8 9 6 9 0 8

Enter the Specific Index Position to insert element: 9

Enter the element to insert in Specific Index Position: 8

After Insertion: 8 0 9 6 9 8 1 5 3 8

Enter the Specific Index Position to delete element: 1

Array after deleting: 8 9 6 9 8 1 5 3 7

Least Value: 1 3 5

Maximum Value: 9 9 8

Page 2 of 3
CSE 1002 :( Problem Solving and Object Oriented Programming)
SCHOOL OF ELECTRONICS ENGINEERING (SENSE)

Question 3:

Write a C program to Get the two strings from the user.


Task:

 Check the length of the strings (If the string length is Even,
Convert the strings into Upper case.
 Check the length of the strings (If the string length is Odd,
Convert the string into Lower case.
 Print common words between two strings without using any
inbuilt functions.
 Reverse the Common Word string and print length.

Expected Output:

Enter String 1: Hello this is C program


Enter String 2: Welcome to C program

Page 3 of 3

You might also like