IT232 C Programming

C Programming TU Board 2022 question paper

22 questionsSit this paper (timed)

Tribhuvan University

Bachelor of Information Technology Management

Semester 1 · TU Board 2022

Course Title: C Programming (IT232)

Full Marks: 60Pass Marks: 30Time: 3 Hrs

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

Group A

Brief Answer Questions(10 × 1 = 10)

  1. 1.

    Define algorithm.

    1
  2. 2.

    List any two modes for opening a file.

    1
  3. 3.

    What is the use of printf() function?

    1
  4. 4.

    List arithmetic and logical operators available in C.

    1
  5. 5.

    Define iteration.

    1
  6. 6.

    Write a syntax to initialized 2D array in C.

    1
  7. 7.

    What are the differences between array and structure?

    1
  8. 8.

    What is the advantage of global variable?

    1
  9. 9.

    What is the use of malloc() function?

    1
  10. 10.

    Define string.

    1

Group B

Short Answer Questions: (Attempt any FIVE Questions)(5 × 3 = 15)

  1. 11.

    Write a program to find the greatest of three number using functions. The function should expect three integers and return the greatest of them.

    3
  2. 12.

    Read a string from the user and find the length of that sting using strlen() function.

    3
  3. 13.

    Differentiate between while and do-while loop. Write a program to print the multiples of 5 less than 100.

    3
  4. 14.

    Write a program that prints the following pattern: 1 1 2 1 2 3 1 2 3 4 1 2 3 5

    3
  5. 15.

    Write a program to find the factorial of a number N read from the user using recursive function.

    3
  6. 16.

    Write a program to sort the numbers in an array.

    3

Group C

Long Answer Questions: (Attempt any THREE Questions)(3 × 5 = 15)

  1. 17.

    What does nested loop mean? Write a program to find the area of the rectangle after taking length and breadth as input from the user.

    5
  2. 18.

    Write a program to read a string and copy it to another string in reverse format. Finally display the original string and the reversed string, without using string handling function.

    5
  3. 19.

    Write a program to read an integer from the user. If the given integer is odd then write it into the file named "Odd.dat", otherwise write it into "Even.dat".

    5
  4. 20.

    Give the syntax of the function in graphics that is used to draw a circle. Draw a flowchart to find the average of n numbers given by the user.

    5

Group D

Comprehensive Answer / Case / Situation Analysis Questions(2 × 10 = 20)

  1. 21.

    What do you mean by enumerations? Explain call by value and call by reference. Write a program to swap two floating type numbers using call by reference.

    10
  2. 22.

    Create a structure that can hold the information of Book with bookID, title and price. Read and store N books in "book.dat" from the user. Display the title of the books having price<1000.

    10

— The End —