C Programming Model Question

Question Paper Details
Tribhuwan University
Institute of Science and Technology
Model Question
Bachelor Level / First Semester / Science
Computer Science and Information Technology ( CSC110 )
( C 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.

Section A

Official Answer
AI Generated Answer

AI is thinking...

Long Answer Questions

Official Answer
AI Generated Answer

AI is thinking...

Attempt any 2 questions.[2 x 10 = 20]

Official Answer
AI Generated Answer

AI is thinking...

1. Define function and list its advantages. Describe the difference between passing arguments by value and passing arguments by address with suitable program.[4 + 6]

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

2. Explain how structure is different from union? Make a program using structure of booklist having data member's title, author, and cost. Enter four data and calculate total cost.[3 + 4 + 3] 

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

3. Explain various modes in which file can be opened? Write a program to CREATE and WRITE N numbers in a file "NUMBER.TXT" . Open this file then read its content and put all even numbers in one file "EVEN.TXT" and odd numbers in another file"ODD.TXT". [2+4+4]

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

Section B

Official Answer
AI Generated Answer

AI is thinking...

Short Answer Questions

Official Answer
AI Generated Answer

AI is thinking...

Attempt any 8 questions.[8x5 = 40]

Official Answer
AI Generated Answer

AI is thinking...

4. What do you mean by a problem analysis? What are the properties of a good algorithm? Explain the Compilation and Execution of any C program?[1+1+3]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

5. Define nested if else statement with suitable flowchart. Write a C code to check if user given input is exactly divisible by 5 or 11 using nested if else statement?[2+3]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

6. List various binary and unary operators used in C? Write a program that uses "while"loop to compute and prints the sum of a given numbers of squares. For example, if 4 is input, then the program will print 30, which is equal to 12+22+32+42 [1+4]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

7. "Size of character array is always declared one more that the input size." Justify the statement. Write a program to read a character array in input as "TRIBHUVAN UNIVERSITY" from the user and find out how many times a character "I" occurs in that array?[1+4]

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

8. Write syntax to declare and initialize 2-dimensional array? With suitable program logic explain how would u find transpose of a 3*3 matrix.[1+4]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

9. Explain the concept of recursive function using the example program to find the factorial of given positive integer.[5]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

10. Describe the fundamental concept of pointer and its arithmetic with suitable examples.[5]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

11. Explain the use of graphical functions. Write a program to draw a triangle using line() graphics function.[1+4]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

12. Write short notes on:[2+3]

i) Dynamic Memory Allocation

ii) break and continue

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...