LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE
FIRST SEMESTER – NOVEMBER 2012
CS 1505 – PROGRAMMING IN C
Date : 08/11/2012 Dept. No. Max. : 100 Marks
Time : 1:00 – 4:00
PART – A
ANSWER ALL THE QUESTIONS: ( 10 x 2 = 20 marks )
- Define typedef statement.
- Write the function used for the string input and string output.
- Define array.
- Write down the components of ‘for loop’..
- What are the functions that help in manipulating strings?
- What do you understand by a pointer to a pointer?
- What is user defined function?
- Define recursion.
- What are the different file handling functions?
- Define union.
PART – B
ANSWER ALL THE QUESTIONS: ( 5 x 8=40 marks )
- a)Write the algorithm to display the largest of three numbers.
(Or)
- b) Describe the different format specifiers of scanf().
- a) Explain the significance of the break statement in the switch-case construct.
(Or)
- b) Explain in detail about the looping statements in C with examples.
- a) Write a C program using pointers to sort the vector elements in descending order.
(Or)
- b) How do you pass an array to a function? Give an example.
- a) Explain the concepts of pointers and functions.
(Or)
- b) Explain in detail about the storage classes.
- a) Explain about declaring and using structures within a structure with an example.
(Or)
- b) Explain in detail about the error handling during Input/Output operations.
PART-C
ANSWER ANY TWO QUESTIONS: ( 2×20=40 marks)
- a) Discuss about the data types used in C with an example.
- b) Write a C program to find out the smallest element in an array.
- a) What are functions in C? Explain the types of functions with an example.
- b) Describe in detail about string handling functions with suitable examples.
- a) Explain the various mode strings that can be passed as the second parameter to fopen.
- b) Explain command line arguments with an example.
Latest Govt Job & Exam Updates: