LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE
FIRST SEMESTER – APRIL 2011
CS 1501/CA 1501/CS 1500 – PROGRAMMING IN C
Date : 19-04-2011 Dept. No. Max. : 100 Marks
Time : 9:00 – 12:00
PART A
Answer ALL the Questions (10×2=20 marks)
- Define unary operator.
- What is a keyword?
- State the need for putchar and getchar functions.
- Write about goto statement.
- What is a Function Prototype.
- What are formal and actual parameters in C?
- What are self referential structures?
- Write the advantages of pointers.
- List the uses of ftell and rewind functions.
- Write down the various formats of fseek function.
PART B
Answer ALL the Questions (5×8=40 marks)
- Draw a flow chart to display biggest of three numbers.
(OR)
- Discuss on bitwise Logical Operators.
- a. Write a C program to find out the sum of n odd numbers 1+ 3 + 5 + …….. + n.
(OR)
- Explain about Dynamic Memory Allocation.
- a. Explain about different storage classes available in C.
(OR)
- Write a C program to pass an array to a function and sort it.
- a. Define the terms Union and Structure. How does they differ?
Explain structures with an example program.
(OR)
- Discuss on Pointers with a suitable example.
- a. Explain about Random Access Files with an example
(OR)
- Write about various File opening modes with description.
PART C
Answer any TWO Questions (2×20=40 marks)
- a. Discuss on various Input/Output Functions in C.
- Write a C program to evaluate the Sine Series f(x) = x – x3/3!+x5/5!+ …….
- a. How a multidimensional array can be defined using pointers? Explain it with an example.
- Write a recursive C program to find out the factorial of a given number.
- a. Explain file I/O function and their description.
- Write a program that reads a string from the keyboard and determines whether the string is
palindrome or not.
Latest Govt Job & Exam Updates: