Panjab University Chandigarh
Computer Programming And Problem Solving Through "C"
Paper : BCA 1st Year
Time : 3 Hrs.
M.Marks : 90
Note : Attempt five questions in all. select one question each from Sections A-D. Question 9 is compulsory.
Section - A
1. (a) Write an algorithm to find a maximum number from a given list of n numbers. 9
(b) what do you mean by Program Debugging ? Explain with example. 9
2. (a) Explain various I/O statements of C- language with suitable examples. 9
(b) What is the difference between standard and formatted statements ? 9
Section - B
3. (a) Explain switch statements along with break, continue and jump statements. 9
(b) How global and local variables are defined and passed to various functions ? Explain. 9
4. (a) What is the difference between "Call-by-value" and "Call-by-reference" ? Explain. 9
(b) Explain "while" , "do-while" and "for-loop" statements. 9
Section - C
5. (a) Why pre-processor directives are imporatnt ? Explain the conditional preprocessor through examples. 9
(b) How arrays of characters are defined and used in C -programs ? 9
6. (a) write notes on "Macros" and "Header files". 9
(b) why pointers are important ? How are they initialized and accessed in C-program? 9
Section - D
7. (a) What is the difference between Structures and Unions ? Write a C-program to demonstrate their usage. 9
(b) How string variables are defined ? Write a C-program to read and write to string variables. 9
8. (a) How arrays of structures are created ? Explain by taking a suitable example and also write a program to access the elements of arrays of structures. 9
(b) How data files are created and opened for reading and writing operations ? Explain. 9
9. Explain:
(i) Any two string handling functions
(ii) Flow-Charts
(iii) Steps in development of a program
(iv) Asssignment statements
(v) Operators of C-language
(vi) Indentifiers
(vii) Recursion
(viii) Expressions
(ix) Constants and variables 2*9 = 18
Computer Programming And Problem Solving Through "C"
Paper : BCA 1st Year
Time : 3 Hrs.
M.Marks : 90
Note : Attempt five questions in all. select one question each from Sections A-D. Question 9 is compulsory.
Section - A
1. (a) Write an algorithm to find a maximum number from a given list of n numbers. 9
(b) what do you mean by Program Debugging ? Explain with example. 9
2. (a) Explain various I/O statements of C- language with suitable examples. 9
(b) What is the difference between standard and formatted statements ? 9
Section - B
3. (a) Explain switch statements along with break, continue and jump statements. 9
(b) How global and local variables are defined and passed to various functions ? Explain. 9
4. (a) What is the difference between "Call-by-value" and "Call-by-reference" ? Explain. 9
(b) Explain "while" , "do-while" and "for-loop" statements. 9
Section - C
5. (a) Why pre-processor directives are imporatnt ? Explain the conditional preprocessor through examples. 9
(b) How arrays of characters are defined and used in C -programs ? 9
6. (a) write notes on "Macros" and "Header files". 9
(b) why pointers are important ? How are they initialized and accessed in C-program? 9
Section - D
7. (a) What is the difference between Structures and Unions ? Write a C-program to demonstrate their usage. 9
(b) How string variables are defined ? Write a C-program to read and write to string variables. 9
8. (a) How arrays of structures are created ? Explain by taking a suitable example and also write a program to access the elements of arrays of structures. 9
(b) How data files are created and opened for reading and writing operations ? Explain. 9
9. Explain:
(i) Any two string handling functions
(ii) Flow-Charts
(iii) Steps in development of a program
(iv) Asssignment statements
(v) Operators of C-language
(vi) Indentifiers
(vii) Recursion
(viii) Expressions
(ix) Constants and variables 2*9 = 18