# Fundamental of Computer Programming – BSc.CSIT (TU) Question Paper 2070 | 1st SEM

## First Semester | First Year | Tribhuvan University Fundamental of Computer Programming (FOCP) | Year: 2070 Computer Science and Information Technology (CSc. 102) Old Question Collection | Question Bank

OR you can read question paper online below;
Full Marks: 60 | Pass Marks: 24 | Time: 3 hours.

Candidates are required to give their answers in their own words as far as practicable.
All questions carry equal marks.

Attempt all questions

1. What is logical error? Write flowchart and program for checking whether the number entered by the user is exactly divisible by 5 or by 11.   [1+5]
OR
What is algorithm? Write an algorithm to check given number is prime or composite. [1+5]
2. What is operator? List any six operators used in C-programming language. Write a program to find least number between any two numbers using ternary operator. [1+2+3]
3. Define printf() function, header file and main function. Find the value of following expression. Use the value initially assigned to the variables for each expressions. [4.5+1.5]
```int a = 8, b = 5; float x = 0.005, y = -0.01; 1) 2 * ((a / 5) + 4 * (b – 3)) % (a + b - 2)); 2) (x > y) && (a > 0) || (b < 5); 3) (a > b)?a:b;```
4. Difference between if and switch statement. Write a program to read the marks of four subjects then find total, percentage and division according to given condition. [1+5]
 Percentage Division p ≥ 80 Distinction 80 > p ≥ 70 First division 70 > p ≥ 50 Second division 50 > p ≥ 40 Third division Otherwise Fail

Assume each subjects carrying 100 full marks and students must secure greater or equal to 40 in each subjects for division.

5. Differentiate between break and continue statement. Write a program to display following output. [2+4]
1
1 1
1 1 1
1 1 1 1
1 1 1 1 1
6. Write a program to input any 10 numbers then find out greatest and smallest number. [6]
7. Write a program to add two 3×3 matrix using function. [6]
8. What is recursion? Write a program to find the factorial of given number using recursion. [2+4]
OR
What is pointer? Write a program to sort ‘n’ numbers in ascending order using dynamic memory. [2+4]
9. List any five names of graphics function. Write a program to read line of text then count no. of vowels, No. of digits and no. of spaces. [2+4]
10. Write a program to create a file “RECORD.TXT” then store roll no, name and percentage of 10 students. [6]
(Visited 485 times, 1 visits today)

Posted By : | Comment RSS | Category : First Semester, Old Question Collection
Subscribe Notes