Computer Programming
Computer Programming
www.andhracolleges.com
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
5. (a) How can a size of a structure be determined? In what units is the size reported.
(b) What is the purpose of typedef feature? How is the feature used in conjunction
www.andhracolleges.com
with structures? [8+8]
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 is the advantage of binary search compared to linear search. Write a program
to perform binary search? [16]
8. Write an algorithm that accepts the binary tree representing an expression and
return the infix version of the expression. [16]
?????
www.andhracolleges.com
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]
www.andhracolleges.com
6. Write a program to read the following data , to find the value of each item and
display the contents of the file. [16]
8. What do you mean by traversal? What are the types of binary tree traversal?[16]
?????
www.andhracolleges.com
Time: 3 hours Max Marks: 80
Answer 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) Write a ‘C’ program to print series of prime numbers using looping and break
statements.
(b) Write a ‘C’ program to find area of triangle. [10+6]
(a) ceil(x)
(b) exp(x)
(c) cos(x)
(d) tolower(x). [16]
www.andhracolleges.com
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 do you mean by exchange sorting? Explain about quick sort. [16]
?????
www.andhracolleges.com
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
1. (a) Write a ‘C’ program to convert number of days - months and days.
(b) Find the output of the following C program [10+6]
main()
{
int x = 3 , y = 7 , z = 8;
x = y == z ;
printf (“%d” , x);
}
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. Explain call by value and call by reference and nesting of function. [16]
www.andhracolleges.com
4. (a) Write a program to evaluate the average of the a values in an array.
(b) Write a program to evaluate the largest number in an array. [8+8]
5. How can a entire structure be passed to a function? How can a entire structure be
returned from a function? [8+8]
7. What are the advantages and disadvantages of stack? Write a program to illustrate
stack operation? [16]
?????