Fundamentals of Computer Programming 2068

Tribhuwan University
Institute of Science and Technology
2068
Bachelor Level / First Semester / Science
Computer Science and Information Technology ( CSC-102 )
( Fundamentals of Computer Programming )
Full Marks: 60
Pass Marks: 24
Time: 3 hours
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 questions

1. Write an algorithm and flow chart to determine whether a given integer is odd or even and explain it.

6 marks view

2. How can you declare the variable in C? Explain with example.

6 marks view

3. Write a program to find the factorial of a given integer.

6 marks view

4. Explain switch statement with example.

6 marks view

5. Write a program to find the largest and smallest among the given elements in an array.

6 marks view

6. Explain the user-defined functions and its types with example.

6 marks view

7. Write a program to accept two numbers and sort them with using pointer.

6 marks view

8. Explain the passing structure to function with example.

6 marks view

9. Write a program to accept any number and print the sum of that number up to a single digit through recursive function.

6 marks view

10. Explain the pointer to structure with example.

OR

Write short notes on:

a) Dynamic memory allocation b) Opening and Closing file

6 marks view