CSIT 1st Semester
C Programming Board Question Paper 2081

Views: …

CSC 115-2081 ✡

Tribhuvan University

Institute of Science and Technology

TUpapers.com TUpapers.com
Bachelor Level/First Year/First Semester/Science
Bachelors in Computer Science and Information Technology (CSC 115)
(C Programming)
(New Course)
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.

Section A
Long Answer Questions
Attempt any Two questions.
[2x10=20]
1.

Define null character. How do you concate and compare two string? An array is called “Balanced Array”, if the number of even elements in array is twice the number of odd elements the array has. Write a program to take the array as input and check whether it is balanced or not. [1 + 2 + 7]

2.

Differentiate between debugging and testing. What is the uses of delimiters? Explain the different types of data types with examples. [3 + 2 + 5]

3.

List any three examples of unformatted I/O. Write a program to find the sum of first 5 prime numbers. The loop will continue to take the input from user until the user has given five prime numbers. [3 + 7]

Section B

Attempt any Eight questions

[8×5=40]
4.

Describe the task of any two graphics functions with example. [5]

5.

Write a program to create a function that will generate 5 random integers, which are stored in static array and return their pointer to main() function such that the elements of array will be printed in main() function. [5]

6.

What are the uses of & and * operator? List the advantages of dynamic memory allocation. [2.5 + 2.5]

7.

A file named NUM.DAT contains the integers and real numbers. Write a program to copy the integers only from NUM.DAT to INT.DAT. [5]

8.

Discuss about operator precedence and associativity with example. [5]

9.

Write a program to take a string in main() function and pass it to an user defined function that will return the length of that string. [5]

10.

Create a structure called "Student" with members name, age, and total marks. Write a C program to input data for two students, display the name of the student having higher total marks. [5]

11.

How do you scan file randomly? When do you prefer union than structure? Justify with an example. [2 + 3]

12.

List any two types of bitwise operators. How do you create nested structure? [2 + 3]