Tribhuvan University
Bachelor of Science in Computer Science and Information Technology
Semester 1 · TU Board 2080
Course Title: C Programming (CSC115)
Full Marks: 60Pass Marks: 24Time: 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.
Group A
Attempt any two questions.(2 × 10 = 20)
- 1.10
Define structure and nested structure. Write a program to find out whether the nth term of the Fibonacci series is a prime number or not. Read the value of n from the user and display the result in the main function. Uses separate user-defined function to generate the nth Fibonacci term and to check whether that number is prime or not.
- 2.10
Explain the relation to array and pointer. Differentiate call by value and call by reference with a suitable program.
Answer comingAlso asked in
- 3.10
Differentiate between source code and object code. Create a structure named Book with members Book_Name, Price and Author_Name, then take input for 10 records of Book and print the name of authors having the price of book greater than 1000.
Group B
Attempt any eight questions.(8 × 5 = 40)
- 4.5
Describe the different types of I/O functions used in file handling with syntax.
- 5.5
Write a program to read P*Q matrix of integers and find the largest integer of each row and display it.
- 6.5
Write a program to calculate the factorial of a given number using recursion.
- 7.5
Write a program to check whether the entered word is pallindrome or not.
- 8.5
List different types of operators and explain any three of them.
Answer comingAlso asked in 2081
- 9.5
Trace the output
#include<conio.h>
#include<stdio.h>
void main(){
int i =0,k;
for(k=5;k>=0;k–){
i=i+k;
}
printf("%d\t",i);
getch();
}
- 10.5
Write a program to compute the sum of first 10 even numbers using function.
- 11.5
What is dynamic memory allocation? Explain with a suitable program.
Answer comingAlso asked in 2078, 2075
- 12.5
Write a program to initialize an array of dimension 10 and sort the numbers within the array in ascending order.
— The End —