Sunday, 11 October 2015

FOC assignment for B.Tech(1st year) students

Dear students,

Find attached assignment on function, pointer and array. Submission deadline is 19th of october. Solution of this assignment will be posted on 20th of october.

   
LEVEL: EASY

1.               Write a program to print array elements along with their address without using pointer.

2.               Write a function to print array elements making use of pointer (base address of array).

3.           Write a function that receives marks received by a student in 3 subjects and returns the average and  percentage of these marks. Call this function from main ( ) and print the results in main ( ).

4.               Write a function to modify values of an array to contain values which are 5 more than current values.  Modified values should be printed in main ( ).



LEVEL: MEDIUM


5.               Write a function power(a,b) to calculate the value of a raised to power b.

6.        Write a function to compute area and parameter of a triangle. User should enter three sides of the  triangle. Area and parameter should be printed in main.

7.               Write a program to search a particular element from an array. Also find number of times it appears in the array.

                                                       

                                                          LEVEL: HARD

8.               Write a recursive function to obtain running sum of first 25 natural numbers.

9.              A positive number is entered through the keyboard. Write a function to find binary equivalent of this number.

10.           Write a program to create a two dimensional array and print its element without using pointer.

11.           Write a program to create a two dimensional array and print its element using pointers.

 Write a program to create array of pointers and use this array to store addresses and print values stored at those addresses.  

No comments:

Post a Comment