Pokhara University
Bachelor of Engineering in Computer Engineering
Semester 1 · PU Spring
Course Title: Programming In C
Candidates are required to give their answers in their own words as far as practicable.
- 1.8
- a) Explain about high level language and low level language. Also describe about types of computer software.
- b) What are the properties of good algorithm? Write an algorithm and draw flowchart to find the sum of n natural numbers.
- 2.15
- a) Differentiate keywords and identifier with suitable examples. Which of the following are invalid variable names and why? Finteger [lout [Tnum | lastname
- b) Differentiate between entry and exit controlled loop with suitable program.
- 3.15
- a) Let's consider the supermarket discount policy: the policy offersa5% discount on the total bill to all customers, irrespective of their purchase amount. Additionally, female customers receive 10% discount if their total bill exceeds Rs. 5000. Write a C program to implement this discount policy and calculate the final bill after applying these discounts. ee ae b) Write a program to display sum of each row of a 3*3 matrix.
- 4.15
- a) How does function returns multiple values? Explain with suitable example.
- b) List out any two advantages and disadvantages of using recursive function. Write a program to generate Fibonacci series upto 35" term using recursive function.
- 5.15
- a) Writea program to sort the n numbers in an array using dynamic memory allocation.
- b) What are different DMA functions in C Programming? Explain any two of them with suitable example. ‘MereEnotes
- 6.7
- a) Differentiate between union and structure. Write a program he ied the records of n students (roll no., name, per, address) using s ruc! and display the records of those student whose address in Chitwan. ;
- b) Why file handling is necessary? Consider the following si RolINo [Name [Adéress [Program | Pat sodas Write a program to create a ‘students.txt' file to store the records of 200 students and display the information of students who were born in 2004. é
- 7.
Write short notes on: (Any two) 2x5
- a) Debugging and testing
- b) String handling functions
- c) External vs global variable ae 7
— The End —