Computer Programming btech 5th Semester CE MG University November 2013

Previous question paper of 5th semester CE, MG University November 2013

B.TECH DEGREE EXAMINATION,NOVEMBER 2013

Fifth  Semester

Branch :Civil Engineering

CE 010 502- COMPUTER PROGRAMMING (CE)

(New Scheme-2010 Admission onwards)

[Regular/Improvement/Supplementary]

Time : Three Hours                                                                                   

Maximum:100 Marks

Write neat and efficient C programs whenever needed.

Part  A

Answer all questions.

Each question carries 3 marks.

1. Distinguish between global and local variables.

2 Give an example for exit controlled loop and explain.

3. Show with an example, how do you declare a two-dimensional array?

4. What is union? How it is different from a structure ?

5. What are the three steps that are followed while accessing a file?

                                                                                                                             (5*3=15 marks)

Part B

Each question carries  5 marks.

6. Explain the use of break and switch with the help of example.

7. Show the various methods to call a function.

8.Show how do you pass arrays as function arguments.

9. Write a structure specification that includes four “float ” variable called length,

    breadth, height and volume. Call this structure “box”.

10.Describe two different methods to update a data file ? Which is better ? Why?

                                                                                                                               (5*5=25 marks)

Part C

Each full question carries  12 marks.

11. (a)List and explain various format field specifications of scanf statements. Give

          examples and explain their meanings.

     (b) Write a C program , with adequate comments, to exchange the values of the

          variables X and Y, without using any temporary variable.

Or

12. Describe with suitable example , all the operators in C; specify their hierarchy 

      operators.

13. What is recursion ? Explain with example, two types of parameters passing in

      Functions.

Or

 14.Write a program with adequate comments to calculate  n C r =   n!    / ( n – r )! r!

      n P r = n!/ ( n – r )! Using functions.

15. Write a C program to do linear search of any one particular character on an array of

       elements. Display if found or not found , if found display its position .

Or

 16. Explain in detail , the different string related operations and the string handling

       functions with suitable example programs to demonstrate each of them .

17.What is meant by dynamic memory allocation ? Explain with the help of examples the

      differences between malloc(),calloc() and realloc() in terms of functions they      

      perform.

Or

 18. Explain in detail about the self referential structure s and with the help of program

       Explain how the different types of linked lists are implemented ?

19. Write a C program with adequate comments , that counts the number of times the first

       three letters of the alphabet(A,a,B,b,C,c) occur in a file . Do not distinguish between

       lower case and upper case letters ?

Or

 20. Write a C program that will receive a file name and a line of test as command line

       arguments and write the test to the file.

                                                                                                                                                                      (5*12=60 marks)

computer-programming-btech-5th-semester-ce-mg-university-november-2013