LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc.
|
DEGREE EXAMINATION – COMPUTER SCIENCE
FIRST SEMESTER – APRIL 2007
CS 1501 – PROGRAMMING IN C
Date & Time: 26/04/2007 / 1:00 – 4:00 Dept. No. Max. : 100 Marks
PART – A
Answer ALL the questions: (10 x 2 = 20)
- Define Algorithm.
- Write a C program to find the greater of two numbers using conditional operator.
- Differentiate between getchar() and getw().
- What is the use of ‘if’ statement?
- What is function prototyping?
- What are external variables?
- How a pointer variable will be declared?
- Differentiate Union and Structure.
- Define file.
- What is a file pointer?
PART – B
Answer ALL the questions: (5 x 8 = 40)
- a) Draw a flowchart to
- find the sum of n numbers.[4 marks]
- display the fibonacci series. [4 marks]
(Or)
- b) Write short notes on constants.
- a) Explain any four types of input and output statements in C with suitable
examples.
(Or)
- b) Explain nested ‘if’ with suitable example.
- a) What is recursion? Explain with an example.
(Or)
- b) Write a C program to find the addition of two 3×3 matrices.
- a) Differentiate ‘call by value’ and ‘call by reference’.
(Or)
- b) Explain with an example how pointers are implemented with structures.
- a) Discuss data files with examples.
(Or)
- b) Explain how to open a file along with the various modes with examples.
PART – C
Answer any TWO from the following: (2 x 20 = 40)
- a) Explain the various steps involved in computer programming. [10 marks]
- b) Explain the various Data types in C with suitable examples. [10 marks]
- a) Differentiate while and do-while statement with examples. [10 marks]
- b) How arrays are passed to functions? Explain with an example. [10 marks]
- a) What is a structure? Explain with an example. [10 marks]
- b) Write a C program to store customer name, phone number and email id in a file
and read the same. [10 marks]
Latest Govt Job & Exam Updates: