Pokhara University
Bachelor of Engineering in Computer Engineering
Semester 1 · PU Spring
Course Title: Programming In C
Full Marks: 100Pass Marks: 45Time: 3 hrs.
Candidates are required to give their answers in their own words as far as practicable.
- 2.15
- a) What are formatted input/output functions? Explain with examples.
- b) Define datatypes. Explain basic data types with examples.
- 3.15
- a) Explain any two conditional statements in detail with syntax and flowchart.
OR
Write a program to find the n" term of a Fibonacci series 0, 1,.1,.2, 3, Sy...
- b) Write a program that prompts the user to enter n numbers from the keyboard, find the sum of even numbers and display the sum.
- 4.15
- a) What are the advantages of using array in programming? Explain different ways to initialize one dimensional array with examples.
OR
Write a program to find the product of two mxn and nxm matrices and display the resulted matrix.
- b) Explain Formal arguments and Actual arguments with an example program.
- 5.15
- a) Using user defined function write a program to input n numbers inan one dimensional array and find the average of the numbers,
- b) What do you understand by pointer? Explain pointer arithmetic in brief,
- 6.15
- a) Create a structure with the following data fields: pereaay piecay R )_R [ron [| same [aston | sat [a Input records of 100 employee and display the record of those employee whose address is “Kathmandu”.
- b) Why do we need file pointer? Explain different file opening modes.
- 7.4
Write short notes on: (Any two) 2%5
- a) Storage Class
- b) Recursive function
- c) — malloc( ), calloc( ) and free() Wa = j
— The End —