[BA 4th Sem Question Papers, Dibrugarh University, 2014, Mathematics, Major, A: Computer Programming (C Programming)]
1. Choose the correct answer: 1x5=5
- The statement char Ch = ‘Z’ would store in ch
- The character Z.
- ASCII value of Z.
- Z along with the single inverted commas.
- None of the above.
- Which of the following is not an arithmetic operator in C?
- +
- –
- /
- **
- To receive the string “We have got the guts, you get the glory II” in an array char str [100], which of the following functions would you use?
- Scanf (“% s”, str);
- Gets (str);
- Getch (str);
- Fgetchar (str);
- The ‘break’ statement is used to exist from
- An if statement.
- A for loop.
- A program.
- The main ( ) function.
- Which of the following is not a valid return statement in C?
- Return (a);
- Return (23);
- Return;
- Return (a, b);
2. Answer any eight of the following questions: 2x8=16
- Write a short note on flowchart.
- Mention the storage classes in C.
- Mention the relational operators in C.
- Evaluate the following expression assuming that is an integer variable:
- Convert the equation
into corresponding C statement.
- Distinguish between the following pairs:
- % s and % c specifications for reading.
- % f and % d specifications for printing.
- Write a C program to evaluate the area of a triangle.
- Any integer is input through the keyboard. Write a C program to find out whether it is an odd number or even number.
- Write a C program to print the numbers from 1 to 10.
- Write a C program to read and print a 2 x 2 matrix.
3. What is algorithm? Write the algorithm to evaluate the area and perimeter of a rectangle. 1+2=3
4. Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a C program to convert this temperature into Centigrade degrees.
Or
Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary and house rent allowance is 20% of basic salary. Write a C program to calculate his gross salary.
5. The marks obtained by a student in 5 different subjects are input through the keyboard. The student gets a division as per the following rules:
Percentage above or equal to 60 – First Division
Percentage from 50 to 59 – Second Division
Percentage from 40 to 49 – Third Division
Percentage less than 40 – Failed.
Write a C program to calculate the division obtained by the student. 4
Or
Write a C program to readand, and evaluate the sum of the series
6. Define an array. Write a C program to evaluate total 1+3=4
Or
Write a C program to add two matrices of order 3 x 3. 4
7. Write a C program to choose minimum of a one-dimensional array of 3
Or
Write a C program to calculate the sum of positive even numbers less than or equal to 100.
8. What do you mean by user defined functions? Write a C program to find the sum of two integers using function prototype. 1+3=4
Or
Write a C program to calculate the sum of the digits of a five-digit integer number. 4
9. Write a C program to arrange an array of 20 numbers in ascending order using function prototype. 4
Or
Write a C program to evaluate a real root of the equation using Newton-Raphson method.
Also Read: Dibrugarh University Question Papers
10. Write a C program to find the sum of the sine series up to terms. It is given that
Write a C program to multiply two matrices of orders 6 x 6.
***
Post a Comment
Kindly give your valuable feedback to improve this website.