This is the question set along with answers of Programming language – Spring, 2016, which was taken by the Pokhara University.
Pokhara University – Programming Language, Spring 2016
Level: Bachelor | Semester – Spring | Year: 2016 |
Program: BCIS | Full Marks: 100 | |
Course: Programming Language (C ) | 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. | What are the purpose of & and * operators in pointer? | |
2. | Write the syntax of the switch statement. | |
3. | Differentiate between malloc ( ) and calloc ( ) function. | |
4. | Why the function prototype is used? | |
5. | Is it necessary to include the header file at the beginning of any program? Why? | |
6. | Define program and programming language. | |
7. | Define macro. | |
8. | Mention all the bitwise operators. | |
9. | Write a four-string related function with proper syntax. | |
10. | Where unions are used. Explain. | |
Section “B”
Descriptive Answer Questions Attempt any six questions |
6×10 | |
11. | What do you mean by dynamic memory allocation? 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 names and display the record of all students whose name starts with alphabet ‘k’. | |
13. | Define an algorithm. What are the features of a good algorithm? Explain. Write an algorithm to find the sum of even numbers from 1 to n. | |
14. | Why data files are necessary for C language? What are the different modes of opening a file? WAP to find the number of vowels from a file named “a.txt”. | |
15. | Define SDLC. Explain in detail about its different steps. | |
16. | Define strings. Write a program to sort n names in the dictionary order. | |
17. | What is a recursive function? Write a program to find y = x n using a recursive function. | |
18. | Section “C”
Attempt all questions Write a program to perform the following functions when the user presses the appropriate choice value. Press Function 1 Find the length of a string without strlen( ) function. 2 Delete all vowels from a given string. 3 Replace all ‘k’ with ‘m’. 4 Exit from program (Use switch statement)
|
20
|
You may also like Programming Language (C Language) – Fall,2017
Leave a Reply