LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE
FIRST SEMESTER – APRIL 2011
CS 1503/CA 1503 – PROGRAMMING IN C
Date : 06-04-2011 Dept. No. Max. : 100 Marks
Time : 1:00 – 4:00
PART – A
Answer ALL the Questions (10 x 2 = 20 marks)
- Specify the symbols used in flow charts.
- Define constants.
- Write the syntax for Nested IF statement.
- What is meant by Single- subscripted variable?
- What is Recursion?
- Define print line Functions.
- Define union.
- Define Pointers.
- Write the syntax to open and close a file.
- What is the use malloc ( )?
PART – B
Answer ALL the Questions (5 x 8 = 40 marks)
- a) Explain in detail about Data types with example.
- b) Explain in detail about precedence of arithmetic operators with example.
- a) Write the different types of IF structure available in C.
- b) Describe the various looping structure with suitable example.
- a) Explain about various string handling functions with examples.
- b) Explain nesting of functions with example.
- a) Explain about pointers in C and its advantages.
- b) Explain about arrays within the structure.
- a) Explain about Error handling during I/O operations.
- b) Write a C program to find number of character, word, line in the given file.
PART – C
Answer any TWO Questions (2 x 20 = 40 marks)
- a) Explain the various operators available in C with example. (10 marks)
- b) Illustrate the various control structures available in C. (10 marks)
- a) What are functions in C? Explain the types of functions with example. (10 marks)
- b) Explain array concepts. Write a program to add two nxn matrices. (10 marks)
- a) Explain the Input and output operations on files with suitable examples. (10marks)
- b) Explain about the dynamic memory allocation in detail. (10 marks)