How To Exam?

a knowledge trading engine...


Mahatma Gandhi University (MGU) 2009 B.Tech Computer Science and Engineering COMPUTER SCIENCE Problem Solving and Computer Programming 09 - Question Paper

Saturday, 18 May 2013 12:20Web


B-TECH. DEGREE exam. OCTOBER 2009
3rd Semester
Branch : Computer Science
issue SOLVING AND COMPUTER PROGRAMMING (R, T)
(Regular/Improvement/Supplementary)
Three Hours Maximum : 100 Marks
Part. A
ans all ques. briefly.
every carries four marks.
1.State and discuss the 4 basic steps in developing a computer program. *
2.What is a pseudocode ? discuss the advantages and provide an example.
3.Explain bitwise operators in C. explain the order of valuation.
4.Explain the arithmetical and logical operators in C with suitable examples.
5.In what ways does "switch" statement different from "if statement ? How a multiple nested if
statement can be changed by "switch.
6.Write the syntax of while loop. What happens if the condition in a "while" loop is initially false ?
7.How structure variable can be declared ? How do structure variable declarations vary from structure kind declaration ?
8.Can structure declarations appear inside functions ? provide an example.
9.Write the general formats for file opening and file closing commands and discuss.
10.Explain the differences ranging from "pass by value" and "pass by reference" ?
(10 x four = 40 marks)
Part B
ans either part A or B from every module.
every ques. carries 12 marks.

11. (A) Write the algorithm and draw a neat flowchart to obtain and print all the fourdgit prime numbers.
(12 marks)
Or
(B) What is meant by (i) modular (ii) structured and (iii) object-oriented programming ? provide 1 example every. define their merits.
(12 marks)

12. (A) Write a C program to prepare the Electricity bill for consumers, provided the subsequent dormation:
service number, previous meter reading, current meter studying. The output must contain
service number, units consumed and Electricity charges. Take the charge as Its. 1.25 per
unit. Indicate clearly formatted I10 statements.
(12 marks)
Or
(B) (i) What is a C constant ? discuss the categories of constants with syntax and examples.
(6 marks)
(ii) What is the significance of declaring a constant unsigned ? elaborate the various ways to declare a C constant ? provide examples.
(6 marks)
13. (A) Write a C program to evaluate the series one + two * one + three * two + . . . N * (N - 1) .
(12 marks)
Or
(B) Write a C function to multiply 2 matrices and store the outcome in a 3rd matrix. The matrices and their orders are passed as arguments. Also write the main program.
(12 marks)
14. (A) Write a C program to learn a sentence and to count the number of appearance of the word
"the" in it.
(12 marks)
Or
(B) provided a matrix of order six x 6, write a C program to obtain the row sum, column sum and
diagonal sum of the values.
(12 marks)
15. (A) Write a C program, using pointers to count the number of words in a provided sentence.
(12 marks)
Or
(B) Write a C program to perform file copy and file update. presume a structure with data members writer name, book title and price. The price of the book is to be updated.
(12 marks)
[5 x 12 = 60 marks]

F 7810    Reg.No.

Name....

B.TECH. DEGREE EXAMINATION, OCTOBER 2009 Third Semester

Branch : Computer Science/Information Technology PROBLEM SOLVING AND COMPUTER PROGRAMMING (R, T) (Regular/Improvement/Supplementary)

Time : Three Hours    Maximum : 100 Marks

Write neat and efficient C programs wherever necessary.

Answer all questions briefly.

Each carries 4 marks.

11.    State and explain the four basic steps in developing a computer program. '

2.    What is a pseudocode ? Explain the advantages and give an example.

3.    Explain bitwise operators in C. Discuss the order of evaluation.

4.    Explain the arithmetical and logical operators in C with suitable examples.

5.    In what ways does switch statement various from if statement ? How a multiple nested if

16. Write the syntax of while loop. What happens if the condition in a while loop is initially false ?

7.    How structure variable can be declared ? How do structure variable declarations vary from structure

8.    Can structure declarations appear inside functions ? Give an example.

9.    Write the general formats for file opening and file closing commands and explain.

10.    Explain the differences between pass by value and pass by reference ?

(10 x 4 = 40 marks)

Part B

Answer either Section A or B from each module.

Each full question carries 12 marks.

1    Module l

11.    (A) Write the algorithm and draw a neat flowchart to find and print all the fourdigit prime numbers.

Or

(B) What is meant by (i) modular ; (ii) structured ; and (iii) object-oriented programming ? Give

Turn over

Module 2

12. (A) Write a C program to prepare the Electricity bill for consumers, given the following information:

service number, previous meter reading, current meter reading. The output must contain service number, units consumed and Electricity charges. Take the charge as Rs. 1.25 per

(12 marks)

Or

(B) (i) What is a C constant ? Explain the categories of constants with syntax and examples.

(6 marks)

(ii) What is the significance of declaring a constant unsigned ? What are the different ways to

Module 3

13. (A) Write a C program to evaluate the series l + 2*l + 3*2 + ...N*(N-l).

(12 marks)

Or

(B) Write a C function to multiply two matrices and store the result in a third matrix. The matrices and their orders are passed as arguments. Also write the main program.

(12 marks)

Module 4

14. (A) Write a C program to read a sentence and to count the number of appearance of the word

(12 marks)

Or

(B) Given a matrix of order 6x6, write a C program to find the row sum, column sum and

Module 5

15. (A) Write a C program, using pointers to count the number of words in a given sentence.

(12 marks)

Or

(B) Write a C program to perform file copy and file update. Assume a structure with data members author name, book title and price. The price of the book is to be updated.







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Mahatma Gandhi University (MGU) 2009 B.Tech Computer Science and Engineering COMPUTER SCIENCE Problem Solving and Computer Programming 09 - Question Paper