LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE
|
FIRST SEMESTER – APRIL 2007
CS 1500 – INTRODUCTION TO C PROGRAMMING
Date & Time: 24/04/2007 / 1:00 – 4:00 Dept. No. Max. : 100 Marks
PART A
Answer all questions: 10 X 2 = 20
- Define flowchart. Give an example
- What do you mean by output specifications in the problem definition phase?
- What is an identifier?
- What is Ternary Operator? Give e.g.
- Write a Program in C that reads a line of text into the computer and then writes it back.
- List out any four-string library functions in C.
- Define function.
- How will you initialize a three dimensional array. Give example
- What is pointer variable?
- What is User Defined Data type? Give example.
PART B
Answer all questions: 5 X 8 = 40
11 a) Discuss the steps involved in developing a computer programming.
Or
- b) Write an algorithm to find the biggest among four numbers.
12 a) Explain any four different types of operators in C Language with an example.
Or
- b) Describe basic data types and its memory range in C with example.
13 a) Write a program in C to swap two values using call by reference.
Or
- b) A student’s letter grade is calculated according to the following schedule. Write a C program
that accepts a student’s numerical grade, converts the numerical grade to an equivalent letter
grade and display the letter given below.
Numerical grade letter grade
>= 90 A
>=80 and < 90 B
>= 70 and < 80 C
>=60 and < 70 D
< 60 F
14 a) Discuss the various storage classes in C.
Or
- b) What is a recursive function? Explain with an example.
15 a) Define union with example. How it’s differ from structure.
Or
- b) Define union variable named car that contains an integer named year, an array of ten
characters named name, and an array of ten characters named model.
PART C
Answer any two questions: 2 X 20 = 40
16a) Discuss briefly about the problem definition phase in Computer Programming.
- b) Discuss briefly about the types of Constant in C with example.
17a) Define Array. Give an example for single dimensional array.
- b) What is a structure? Explain the accessing and processing of structure with example.
18a) Explain briefly about Pointer Arithmetic with example.
- b) Explain the various file related operations available in C.