Sei sulla pagina 1di 4

Code.

No: 41014
R07 SET-1
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
I B.TECH SUPPLEMENTARY EXAMINATIONS JANUARY- 2010
COMPUTER PROGRAMMING
(Common to ME, CHEM, MCT, MEP, AME)
Time: 3hours Max.Marks:80
Answer any FIVE questions
All questions carry equal marks
---

1.a) Define an algorithm? Write an algorithm to find the sum of all even numbers
between 1 and n?
b) What are various conditional and logical operations in ‘C’. Explain them with an
example? [8+8]

2.a) Write a ‘C’ program to print following pattern


*
* * *
* * * *
b) Write a ‘C’ program to find roots of a quadratic equation for all cases? [8+8]

3.a) Explain in detail about user-defined functions with the help of sample `C’
program?
b) Write a `C’ program to find factorial of a number using recursion? [8+8]

4.a) Write a `C’ program to sort the elements in an array?


b) Explain pointers and array concept with a sample `C’ program? [8+8]

5. What is a structure? Give its advantage? Give an example of creating and


accessing members of a structure? [16]

6.a) Explain opening and closing of a file?


b) Briefly discuss about error handling in `C’ language? [16]

7.a) Explain stack operations (Push and Pop) with an example?


b) Write a `C’ program to implement linear search? [8+8]

8. Explain various binary tree transversal techniques with the help of example?
[16]

*****
Code.No: 41014
R07 SET-2
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
I B.TECH SUPPLEMENTARY EXAMINATIONS JANUARY- 2010
COMPUTER PROGRAMMING
(Common to ME, CHEM, MCT, MEP, AME)
Time: 3hours Max.Marks:80
Answer any FIVE questions
All questions carry equal marks
---

1.a) Explain type conversion in `C’ language with an example?


b) What are various arithmetic and bitwise operations in `C’, explain them with an
example? [8+8]

2.a) Write a `C’ program to print following pattern


1
1 2 1
1 3 3 1
b) Write short notes on break and continue statements? [8+8]

3.a) With the help of a sample `C’ code explain various parameters passing methods?
b) Write a `C’ program to find Fibonacci numbers for a given ``N’’ using recursion?
[8+8]

4.a) What is an array? Explain various types of array with an example?


b) Write short notes on command line arguments? [8+8]

5. What is a structure? Explain the concept of passing structures to functions with


sample `C’ code? [16]

6. Describe various types of files with an example for each? [16]

7.a) Explain Circular Queue operations (Insert and Delete) with an example?
b) Write a `C’ program to implement Binary search method? [8+8]

8. Explain breadth first search (BFS) and Depth first search (DFS) algorithms with
an example? [16]

*****
Code.No: 41014
R07 SET-3
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
I B.TECH SUPPLEMENTARY EXAMINATIONS JANUARY- 2010
COMPUTER PROGRAMMING
(Common to ME, CHEM, MCT, MEP, AME)
Time: 3hours Max.Marks:80
Answer any FIVE questions
All questions carry equal marks
---

1.a) Define the flow chart? Draw a flow chart for finding GCD of two numbers?
b) What are various assignment and relational operators in `C’, explain them with an
example? [8+8]

2.a) Write a `C’ program to print following pattern


1
1 2 1
1 3 3 1
b) Explain the difference between do while and while do statements with the help of
an example? [8+8]

3.a) Explain standard `C’ library functions with example?


b) Write a `C’ program to find Fibonacci numbers for a given ``N’’ using recursion?
[8+8]

4.a) Define 2-D array? Write a `C’ program to eliminate duplicate elements in an array
(i.e input: 1,1,2,3,2,4: Output: 1,2,3,4)?
b) With a sample `C’ code explain calloc() and malloc() functions? [8+8]

5. Explain pointers to structures with the help of a sample `C’ program? [16]

6. Elaborate file handling functions in `C’ with the help of sample code? [16]

7. Explain the Quick sort algorithm with the help of an example? [16]

8. Explain breadth first search (BFS) and Depth first search (DFS) algorithms with
an example? [16]

*****
Code.No: 41014
R07 SET-4
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
I B.TECH SUPPLEMENTARY EXAMINATIONS JANUARY- 2010
COMPUTER PROGRAMMING
(Common to ME, CHEM, MCT, MEP, AME)
Time: 3hours Max.Marks:80
Answer any FIVE questions
All questions carry equal marks
---

1.a) Explain the control statements in `C’ language with an example?


b) What are various increment/decrement and bitwise operators in `C’, explain them
with an example? [8+8]

2.a) Write a `C’ program to print following pattern


1
1 2
1 2 3
1 2 3 4
b) With an example given a brief notes on if and switch case statements? [8+8]

3.a) Write a `C’ code to send and receive value from user defined functions?
b) State and explain the storage classes in `C’ language. [8+8]

4.a) What is an array? Write a `C’ program to perform matrix multiplication?


b) Write short notes on pointer-pointer concept? [8+8]

5. Write a program using structures to display following information for each


student name, Roll-number, mark1, mark2, mark3, total, average? [16]

6. What is random access file? Explain the functions used in random access file?
[16]

7. Explain the Merge sort algorithm with the help of an example? [16]

8. Explain various binary tree traversal techniques with the help of examples?
[16]
*****

Potrebbero piacerti anche