07a1ec04 Computer Programming
07a1ec04 Computer Programming
1
I B.Tech Supplimentary Examinations, Aug/Sep 2008
COMPUTER PROGRAMMING
( Common to Mechanical Engineering, Mechatronics, Production
Engineering and Automobile Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
2. Write short notes on selection statement. Write a ‘C’ program to find Armstrong
number using if statement. [16]
3. Write a program to find sum of odd & even series by using function with argument
and no return value. [16]
5. Define Structure and write the general format for declaring and accessing structure
members with an example. [16]
7. What do you mean by data structure? Explain about Non - Linear data structure?
[16]
⋆⋆⋆⋆⋆
1 of 1
Code No: 07A1EC04 Set No. 2
I B.Tech Supplimentary Examinations, Aug/Sep 2008
COMPUTER PROGRAMMING
( Common to Mechanical Engineering, Mechatronics, Production
Engineering and Automobile Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
1. (a) What do you mean by enumerated data type explain with example?
(b) Define local and global variable. [10+6]
2. (a) What are the commonly used Input / Output functions used in ‘C’. How they
are accessed?
(b) What is the standard Input / Output header files in ‘C’ ? How it is used?
[10+6]
3. Write a program to find sum of odd & even series by using function with argument
and no return value. [16]
⋆⋆⋆⋆⋆
1 of 1
Code No: 07A1EC04 Set No. 3
I B.Tech Supplimentary Examinations, Aug/Sep 2008
COMPUTER PROGRAMMING
( Common to Mechanical Engineering, Mechatronics, Production
Engineering and Automobile Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
1. What is the purpose of constant? Write short notes on String and enumeration
constant with example. [16]
2. (a) What are the commonly used Input / Output functions used in ‘C’. How they
are accessed?
(b) What is the standard Input / Output header files in ‘C’ ? How it is used?
[10+6]
(a) ceil(x)
(b) exp(x)
(c) cos(x)
(d) tolower(x). [16]
5. Define Structure and write the general format for declaring and accessing structure
members with an 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. What are the advantages of external sorting? Write a program to perform merge
sort with following elements [16]
Set A {10, 5,20,25}
Set B {17,19,21,23}
⋆⋆⋆⋆⋆
1 of 1
Code No: 07A1EC04 Set No. 4
I B.Tech Supplimentary Examinations, Aug/Sep 2008
COMPUTER PROGRAMMING
( Common to Mechanical Engineering, Mechatronics, Production
Engineering and Automobile Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
2. (a) Write a ‘C’ program to find sum of digits of an integer using while loop.
(b) Give the features of for - loop. [10+6]
3. Write program for arranging number in descending order using function without
argument and with return value. [16]
5. Define Structure and write the general format for declaring and accessing structure
members with an example. [16]
6. Write a program for indexed sequential file for the employee database for the fol-
lowing operation. [16]
7. What is the advantage of binary search compared to linear search. Write a program
to perform binary search? [16]
⋆⋆⋆⋆⋆
1 of 1