Computer Programming [June 2009 Regular]

  • Upload
    micmech

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

  • 8/9/2019 Computer Programming [June 2009 Regular]

    1/4

    Code No: Z0322 / R07 Set No. 1

    I B.Tech - Regular Examinations, June 2009COMPUTER PROGRAMMING

    ( Common to Mechanical Engineering, Mechatronics, ProductionEngineering and Automobile Engineering)

    Time: 3 hours Max Marks: 80Answer any FIVE Questions

    All Questions carry equal marks

    1. (a) Explain the steps involved in program development life cycle in C language.

    (b) What are the advantages and disadvantages of flowchart? [10+6]

    2. Write a C program to print a table of the binary, octal and hexadecimal equivalentsof the decimal numbers in the range 1 through 256. [16]

    3. Define actual parameter and formal parameter. What is meant by global and localvariable, explain with example? [6+10]

    4. Describe operations on pointers with example. [16]

    5. Define Structure and write the general format for declaring and accessing structuremembers with an example. [16]

    6. Write a program using indexed sequential file for employee database. [16]

    7. What difference between queue and circular queue? Explain about circular queueoperations? [16]

    8. Define binary tree. What are the application of binary tree? [16]

    1 of 1www.micame.in

  • 8/9/2019 Computer Programming [June 2009 Regular]

    2/4

    Code No: Z0322 / R07 Set No. 2

    I B.Tech - Regular Examinations, June 2009COMPUTER PROGRAMMING

    ( Common to Mechanical Engineering, Mechatronics, ProductionEngineering and Automobile Engineering)

    Time: 3 hours Max Marks: 80Answer any FIVE Questions

    All Questions carry equal marks

    1. Write short notes on:

    (a) Increment and Decrement Operators.

    (b) Conditional Operators. [16]

    2. What are the different format specifiers available for Input and Output statementsavailable ? [16]

    3. (a) Write a program to explain the concept of the variable will be retained throughout the program.

    (b) Explain the following library functions [10+6]

    i. sqrt(x)

    ii. fmod(x,y)4. Explain an array , array declaration and features of array. [16]

    5. Define Structure and write the general format for declaring and accessing structuremembers with an example. [16]

    6. Write a program for indexed sequential file for student database. [16]

    7. What do you mean by data structure? Explain about Non - Linear data structure?[16]

    8. Explain the single source shortest path algorithm. [16]

    1 of 1www.micame.in

  • 8/9/2019 Computer Programming [June 2009 Regular]

    3/4

    Code No: Z0322 / R07 Set No. 3

    I B.Tech - Regular Examinations, June 2009COMPUTER PROGRAMMING

    ( Common to Mechanical Engineering, Mechatronics, ProductionEngineering and Automobile Engineering)

    Time: 3 hours Max Marks: 80Answer any FIVE Questions

    All Questions carry equal marks

    1. What is the purpose of size of and pointer operator in C explain with program?[16]

    2. (a) What is the purpose of getchar function? How is it used within a C program.

    (b) What is the purpose of putchar function ? How is it used within a C program.[8+8]

    3. (a) Write an example to explain about call by value.

    (b) Write a factorial program using no return and no argument type. [10+6]

    4. Describe operations on pointers with example. [16]

    5. How to copy one structure to another structure of a same data type, give example?

    [16]

    6. (a) Write the syntax for opening a file with various modes and closing a file.

    (b) Explain about file handling functions. [8+8]

    7. Illustrate stacks with Dynamic memory allocation with an example program. [16]

    8. (a) What is a network?

    (b) What is a spanning tree?

    (c) Define minimal spanning tree.

    (d) What are the various traversals in a tree? [4+4+4+4]

    1 of 1www.micame.in

  • 8/9/2019 Computer Programming [June 2009 Regular]

    4/4

    Code No: Z0322 / R07 Set No. 4

    I B.Tech - Regular Examinations, June 2009COMPUTER PROGRAMMING

    ( Common to Mechanical Engineering, Mechatronics, ProductionEngineering and Automobile Engineering)

    Time: 3 hours Max Marks: 80Answer any FIVE Questions

    All Questions carry equal marks

    1. (a) Define Psuedocode.

    (b) Define flowchart.

    (c) What are the different stages in the program development? [3+3+10]

    2. (a) What is the difference between selection and iteration statement?

    (b) Write short notes on if statements. [6+10]

    3. (a) Define parameter passing method and how they can be passed.

    (b) Explain what are the elements of user defined function. [8+8]

    4. (a) Write a program to print the value and address of the elements.

    (b) How to use pointers in array? [10+6]

    5. How to copy one structure to another structure of a same data type, give example?[16]

    6. (a) Write the syntax for opening a file with various modes and closing a file.

    (b) Explain about file handling functions. [8+8]

    7. Write a program to evaluate the following expression X = A/B * C +D * E topostfix using stack. [16]

    8. (a) What is binary tree? What is the representation of binary tree?

    (b) What are the common operations done in a binary tree explain any one?[6+10]

    1 of 1www.micame.in