This is the question set along with answers of Programming language (PL) ( C Language) – Spring, 2017, which was taken by the Pokhara University.
Pokhara University – Programming Language (PL)
Level: Bachelor | Semester – Spring | Year: 2017 |
Program: BCIS | Full Marks: 100 | |
Course: Programming Language (PL)
|
Pass Marks: 45 | |
Time: 3hrs. |
Candidates are required to give their answers in their own words as far as practicable. |
The figures in the margin indicate full marks. |
Section “A”
Very Short Answer Questions Attempt all the questions. |
10×2 |
|
1. | Define the term FILE in file handling? | |
2. | Write the syntax of for, while and do-while loop. | |
3. | What does *p mean? | |
4. | Why function is used. | |
5. | Explain about preprocessor directive? | |
6. | Mention some characteristics of a good algorithm. | |
7. | Define malloc and calloc function. | |
8. | Where & and -> operators are used. | |
9. | Define string. | |
10. | Define union. | |
Section “B”
Descriptive Answer Questions Attempt any six questions |
6×10 | |
11. | Differentiate between ordinary variable and pointer variable with suitable example. WAP to sort an array of n integer data with help of pointer. | |
12. | Write a program to read the name, roll no, total mark of n students. Sort them in ascending of their total mark and display the record of the top 5 students. | |
13. | Define flowchart. What are the different symbols used in the flowchart. Explain. Draw a flowchart to find the largest among three numbers | |
14. | Define data files are used in C. What are the different modes of opening a file. WAP to read name, roll and the total mark of a student and store in the data file. | |
15. | WAP to read the name of n students and display them in dictionary order. | |
16. | What is SDLC? Explain about different stages of SDLC. | |
17. | What is a recursive function? Write a program to calculate y= xn using a recursive function. | |
18. |
Section “C”
Case Analysis Write a program to perform the following functions when the user presses the appropriate choice value.
Press Function a) Read the name, roll, and mark of n student and store it in data file named “college.txt” b) Read all from file “college.txt” and display those records whose name starts with letter‘s’. c) Read data from file “college.txt”, and copy the data to the next file named “ university.txt” whose marks are greater than 50. d) Exit from program |
20 |
You may also like Programming Language (PL) – Spring,2016
Leave a Reply