, , ,

[SOLVED] Cs1412 assignment 6: functions

$25

File Name: Cs1412_assignment_6:_functions.zip
File Size: 282.6 KB

5/5 - (1 vote)

Programs:
1. Write a program to swap two elements using call by value and call by reference. Take the
two input numbers from the user. Use function named swap to swap the elements and call
it in the main function. Also write down in your own lines in the comments what you
have understood about call by value and call by reference.2. Write a program that asks the user to enter a series of integers (which it stores in an
array), then sorts the integers by calling the function selection_sort. When given an array
of n elements, selection_sort must do the following:a. Search the array to find the largest element, then move it to the last position in the
array.
b. Call itself recursively to sort the first n-1 elements of the array.3. Write a program in C to find the sum of the series 1!/1+2!/2+3!/3+4!/4+5!/5 using the
function.Write pseudocode to solve the given problems.Write C program to solve the above problems. Name your file Lab6_YourName.c

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Cs1412 assignment 6: functions
$25