BIT102 C Programming

C Programming TU Board 2080 question paper

12 questionsSit this paper (timed)

Tribhuvan University

Bachelor of Information Technology

Semester 1 · TU Board 2080

Course Title: C Programming (BIT102)

Full Marks: 60Pass Marks: 24Time: 3 hours

Candidates are required to give their answers in their own words as far as practicable.

Group A

Attempt any Two questions.(2 × 10 = 20)

  1. 1.

    What is an array? How array can be passed as function argument? Write a program to arrange an array having 10 integer numbers in ascending order using function.

    10
  2. 2.

    Explain different control structures in C. Write a program in C to perform different arithmetic operations on two integers and display the result based on choice made by user using switch statement.

    10
  3. 3.

    Differentiate between structure and union? Write a program to read employ id, name, post and salary of 20 employees and display detail of those employee whose post is "clerk".

    10

Group B

Attempt any Eight questions(8 × 5 = 40)

  1. 4.

    What is recursion? Write a program to find the factorial of a given integer using recursion.

    5
  2. 5.

    What are conversion specifiers? Explain the basic structure of a C program.

    5
  3. 6.

    Explain nested if else ladder with suitable example.

    5
  4. 7.

    Explain structure of for loop. Write a program to reverse a number entered by user.

    5
  5. 8.

    What is DMA? Write a program to read N numbers and find largest and smallest number using DMA.

    5
  6. 9.

    Why data file is needed? Write a program to write N numbers in file "number.txt" and then read it and display only even numbers.

    5
  7. 10.

    List out different operators in C. Explain Logical and relational operator.

    5
  8. 11.

    What is pointer? Explain the similarity between array and pointer in brief.

    5
  9. 12.

    Write short notes on: a) Macro b) Opening and closing file

    5

— The End —