You are on page 1of 2

POKHARA UNIVERSITY

Level: Bachelor Semester – Fall Year : 2009


Programme: BE Full Marks: 100
Course: Computer and Programming II 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.
Attempt all the questions.

1. a) Define the text editor in your own word? Define the role of flowchart 2+6
and algorithms with help of example to detect biggest number among
3 user given numbers.
b) What is an identifier? Define the various types of C operators with 2+5
suitable examples.
2. a) How does the while loop varies with the do ... while loop? Write a 10
program to read a number 'no' from user and test whether it is prime
or not by using while and do ... while loop.
b) Explain the recursive function with help of a program to compute the 5
factorial user given number.
3. a) Define the string functions of C programming language strcpy (), 5
strcmp () and strlen () with help of syntax.
b) What do you mean by an array? Write a C program to read the 10
elements for a 3 × 3 order matrix then compute
i. sum of all element
ii. left diagonal elements
iii. right diagonal elements.
4. a) Find out the total memory taken by 5
(i) struct student (ii) union student
{ int roll; { int roll;
float fee; float fee;
char name [10]; char name [10];
char month [5]; char month [5];
} record [10]; } record [10];

1
b) Write a C program by using structure to compute the mark sheet of 10
student by reading the value of 5 different subject's and applying the
general rules.
5. a) What is pointer? Define its importance in program development. 7
b) Define the function call by reference with suitable program module. 8
6. a) Write a program to read name, rate and quantity of five items from 8
user then compute amount and store all attributes in a new file
neccfas.txt.
OR
i. Wirte a program by using function to generate the
Fibonacci series up to user given terms.
ii. Write a program to print the number in the sequence of
1
2 2
3 3 3
4 4 4 4
b) Write a program to read 10 roll numbers of student then arranging in 7
descending order then print both the unsorted and sorted listed.
7. Write short notes on (Any Two) 2×5
a) Formatted Specifies
b) Algorithm to develop multiplication table for user's number
c) Write a program to amount in dollar then convert into Rupees.

You might also like