Friday 30 November 2012

First Semester BCA Degree Examinations BCA 105 Problem Solving and Programming in C (2007 Admission onwards)mg university


Time : 3 hrs Marks: 75

                                      PART A

(Answer any Ten questions, Each question carries 3 marks)

1. Describe the features of a good computer program.
2. What is meant by type casting?. Explain.
3. List out the precedence of arithmetic, relational and logical operators.
4. Distinguish between do ..while and while statement
5. What will be the value of k,y,z(all integer variables) after executing the following statements (i) y+=(--y)x2/k++ (2) (k>2)?,y+=k++,z-=k-- on the assumption that the initial value of k=2,y=3,z=1
6. Explain how an array differs from a structure
7. Briefly explain any three string functions available in string.h
8. What is a user defined function?. What advantages it offers in programming.
9. Write a function to swap the content of two memory locations using pointers.
10. Explain with an example the use of enum data type in C programming.
11. Discuss the working of a C program using command line arguments.
12. Explain preprocessor directive statements.

                                        PART B

( Answer all questions, Each question carries 9 marks)

13. Distinguish algorithm and flowchart. Write an algorithm and draw a flowchart to find the number of negative numbers, zeros and positive numbers from a list of n given numbers.
OR
14. Write short note on the following
i) Structured programming
ii) Top-down programming approach
iii) Bottom-up programming approach
15. Explain in detail the fundamental data types in terms of key word, size
in bytes, range of number it can occupy and format specifier etc
OR
16. What is a mixed mode expression?. Explain how it will be evaluated with
an example program illustrating truncation effect.
17.Write a program to sort an array of integers in ascending order and to
print the position of an integer in the sorted sequence.
OR
18. Write a program to manipulate a string in the following way
i) To count no of words on the assumption that a blank space separate two words.
ii) No of times a given alphabet occurs.
iii) Replace the first letter of all words in upper case
19. Explain the concept of array of structure. With an example illustrate the passing of a structure variable into a function.
OR
20. What is a recursive function?. Write a recursive function to find the nth
power of a number. Using this function write a program to sum the series
1 + x+x2+x3+………….for the first 20 terms.
21. Discuss the advantages of using pointers in programming. Explain pointer
arithmetic and how an array can be referenced using a pointer to the array.
OR
22. Explain any three file manipulation functions in C language.

No comments:

Post a Comment