Fundamentals of Computer Programming 2067

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

Attempt all questions

Official Answer
AI Generated Answer

AI is thinking...

1. Draw the flowchart for the solution of a quadratic equation and write an algorithm and explain it.

6 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

2. Find the value of “a” in each of the following statements:

Int i = 2, j = 5, k = 7

Float a = 1.5, b = 2.5, c = 3.5

(a) a = c – i / j + c / k;

(b) a = (c – i) / k + (j + b) / j;

(c) a = b * b – ((i+j) / c);

(d) a = b – k + j / k + i * c;

(e) a = c + k % 2 + b;

(f) a = (b + 4) % (c + 2);

6 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

3. A machine is purchased which will produce earning of Rs. 20000 per year while it lasts. The machine costs Rs. 120000 and will have a salvage value of Rs. 20000 when it is condemned. If the 12 percent per annum can be earned on alternative investments, what should be the minimum life of the machine to make it a more attractive investment compared to alternative investments?

6 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

4. Write a program to transpose the following matrix.


                      −3   7    5      -2   8

                       2    5    8       3    -4

                     −6   9    3       6     5



6 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

5. Write a program that uses a do...while loop to compute and prints the sum of squares given n numbers.

6 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

6. Write a function to multiply two x matrices.

6 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

7. Write a program to count the number of words in a sentence.

6 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

8. Why pointer is called jewel of C language? Write a program that uses pointers to copy an array of integer.

OR

Explain the importance of pointer. Write a function that is passed an array of pointers to floats and returns a newly created array that contains those n float values.

6 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

9. Define a structure of student having data members, name, address, marks in C language, and marks in information system. Take data for n students in an array dynamically and find the total marks obtained.

6 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

10. Some text file is given; create another text file replacing the following words “Ram” to “Hari”, “Sita” to “Gita”, and “Govinda” to “Shiva”.

OR

What are the uses of graphical function? Explain the basic graphical function with suitable program.

6 marks
Details
Official Answer
AI Generated Answer

AI is thinking...