[BA 4th Sem Question Papers, Dibrugarh University, 2013, Mathematics, Major, A: Computer Programming (C Programming)]
1. Choose the correct answer: 1x5=5
- The maximum length of a character constant can be
- 1 character.
- 8 characters.
- 254 characters.
- None of the above.
- Ifis an integer variable, will return a value
- 2
- 1
- 2.25
- 0
- A DO/WHILE loop is useful only when we want that the statements within the loop must be executed
- Only once.
- More than once.
- At least once.
- None of the above.
- The keyword used to transfer control from a function back to the calling function is
- Switch.
- Goto.
- Goback.
- Return.
- A C-variable cannot start with
- An alphabet.
- A number.
- A special symbol other than underscore.
- Both (ii) and (iii) above.
2. Answer the following questions: 2x8=16
- Name the basic data types in C.
- Write a short note on algorithm.
- Write the modes of expressions in C.
- Mention the bitwise operators in C.
- Mention the programming situations in which the logical operators && and 11 are useful.
- Write the printf statement to print the following:
- Let two numbers be entered through the keyboard into two locations. Write a C program to interchange the contents of the variables.
- Write the syntax of ‘if else’ statement and draw flowchart for it.
3. What is flowchart? Draw a flowchart to calculate the largest number among three given numbers. 1+3=4
4. Write a C program to calculate the sum of the digits of a four-digit integer number. 3
Or
Write a C program to find the solution of the system of linear equations
5. Write a C program to calculate compound interest. 4
Or
Write a C program to check whether a triangle is valid or not, when the three angles of the triangle are entered through the keyboard. (A triangle is valid if the sum of the three angles is equal to 180 degrees.)
6. Define an array. Write a program to find average marks of 100 students in a test. 1+3=4
Or
Write a C program to find the mean and standard deviation of a one-dimensional array of n numbers. 4
7. Write a program to generate first 20 Fibonacci numbers 1, 1, 2, 3, 5, 8,….. 3
Or
Write a C program to arrange an array of 10 numbers in ascending order.
8. Write a C program to multiply two 3 x 3 matrices. 4
Or
Write a C program to determine whether a given number is prime or not.
9. What is function? Write a C program to find square of a number using function prototype. 1+2=3
Also Read: Dibrugarh University Question Papers
10. Write a C program to evaluate factorial of a number using function prototype. 4
Or
Write a C program to find the solution of the quadratic equation
***
Post a Comment
Kindly give your valuable feedback to improve this website.