Tribhuvan University | Old Is Gold
Institute Of Science And Technology
Computer Science and Information Technology
Course: Fundamental Of Computer Programming
Level: Bachelor | First Year | Semester: First | Year 2066 | Science
Full Marks: 60 | Pass Marks: 24 | Time: 3 Hrs


Download - File Size: 52.2 kb | Question Paper Of 'Fundamental Of Computer Programming' 2066 | CSIT | TU

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

All questions carry equal marks.

Attempt all questions.

1. Why flowchart is required? Explain different symbols used in the flow chart and explain with suitable example.

2. Determine which of the following are valid identifiers? If valid, explain why?

a) record1                       b) 1record
c) file_3                          d) return
e) #tax                            f) name
g) goto                            h) name and address
i) name-and-address        j) 123-45-6789
k) Void                            l) name_address

3. Find the error in the given program and explain it. Write the correct program.

#include<stdio.h>
#include<math.h> main
{
float p,r,n;
printf( “Please enter the value for the principal (P): “ ); scanf(%f, &p):
printf( “ Please enter the value for the interest rate (R)); scanf( “%f ”, &r);
printf( “Please enter the value for the number of years (n): “); scanf( “%f, n);
= p * pow + r/100), n);
Printf( \n The final value (F) is: %. 2f\n” , f);

4. Write a program that uses a “while” loop to compute and prints the sum of a given numbers of squares. For example, if 4 is input, then the program will prints 30, which is equal to
5. Write a program to enter two 3 x 3 matrices and calculate the product of given matrices.

6. Explain the use of two dimensional arrays. Illustrate it with suitable program and explain it.

7. Write and test the following power ( ) function that returns x raised to the power n, where n can be any integer:
double power (double x, int p)

8. Justify that pointer is jewel in C language. Write a function that is passed an array of n pointers to floats and returns a newly created array that contains those n float values in reverse order. Assume any necessary data.
OR
Explain pointer with suitable diagram. Write a function that uses pointers to search for the address of a given integer in a given array. If the given integer is found, the function returns its address; otherwise it returns NULL.

9. Why structure is required? Make a program using structure of booklist having data members title, author and cost. Enter four data and calculate total cost.

10. Create a text file and enter “to write a good program is very time consuming job”. Create another text which contains reverse of above text.
OR
Explain the use of graphical function. Make a program that contains basic graphic functions.

0Comments

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow.

Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Previous Post Next Post