LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE
|
FIRST SEMESTER – NOV 2006
CS 1501 – PROGRAMMING IN C
Date & Time : 01-11-2006/1.00-4.00 Dept. No. Max. : 100 Marks
PART – A |
|
Answer all the questions: | (10 x 2 = 20) |
- Mention the symbols used in flowchart.
- List any four library functions in C.
- Differentiate between getchar and gets function.
- What is the use of break statement?
- What is the use of return statement?
- Differentiate between strcmp() and strcpy().
- What is pointer? How do you declare a pointer variable?
- Differentiate between structure and arrays.
- What is a file?
- Write the syntax for opening and closing a file.
PART – B |
|
Answer all the questions: | (5 x 8 = 40) |
11.a) i) Explain the problem definition phase with examples.
- ii) Explain any 4 data types in C.
(Or)
- b) Enumerate the various operators in C.
12.a) Explain while and do-while and write programs demonstrating
those looping statements.
(Or)
- Write a C program to display the fibonacci series for n numbers.
13.a) Explain the concept of ‘call by value’ and ‘call by reference’ with examples.
(Or)
- b) Write a C program to demonstrate any 4 string functions using switch case.
- a) Explain how pointers are used with arrays. Explain with an example.
(Or)
- b) Write a C program to enter student number, student name, and marks in two
subjects and calculate the total and average and display the same using
structures.
- a) Write a C program to enter employee number, employee name, basic pay
and store them in a file.
(Or)
- b) Explain the various input and output statements used in files.
PART – C |
|
Answer any two questions: | (2 x 20 = 40) |
- a) Explain the steps that are involved in computer programming.
- b) Explain the different types of ‘if’ statements with examples.
- a) Write a C program to find the transpose of a given matrix.
- b) How will you pass arrays to functions? Explain with examples.
- a) How will you access a variable in a structure using pointers. Explain with
example.
- b) Explain External variables and static variables with examples.
Latest Govt Job & Exam Updates: