Tuesday, 28 February 2017

C Programming Theory


MODEL EXAMINATION

Subject: C Programming
Time: 2 Hrs
Max. Marks: 50

I. Fill in the blanks :-
1. Reserve words in C are called ………….
2. . ………are the types of datas stored in a variable.
3. Scanf ( ) is a ….. ….. Function.
4. Symbols that are used to perform some operations are called ……….
5. …….statements are used to execute set of instructions repeatedly.
6. While is an example of …….controlled loop.
7. ……. Is a collection of same type of data elements?
8. ………is an example of multidimensional arrays
9. Character arrays in C are called …………….
10. .…….are the self contained block of statements that performs a task. 
(10 x1/2=5)
II. Fill in the blanks

1. Identifiers must not begin with a digit.
2. Array is an example of basic datatype.
3. printf( ) is a formatted output function.
4. switch statements are used to make a decision ,from a set of choices.
5. do..while is an entry controlled loop.
6. In an  array  the elements are stored in continues  memory    locations.
7. Matrix is a one dimensional array.
8. A string is terminated  by a null value.
9. A function call not invokes the execution of function.
10. Structure is a collection of same data items.        
(10 x 1/2=5)

III. Short Questions
1. Explain arithmetic operators in C?
2. Write the syntax of if ..else statements ?
3. Define arrays in C?
4. What are the string input functions in C?
5. What is the use of strcat()?
6. Name the different types of library functions in C?
7. What is mean by structure write the syntax also?
8. Difference between structure and union?
9. What are the major operations performed on a file?
10. What is mean   by random file accessing, name the functions used in it?

IV. Answer any four of the following :-
1. What are the naming rules of identifiers?
2. What is a flow chart and explain the symbols used in it?
3. Write a program to find the given number is odd or even?
4. Write a program to compare two strings?
5. Write a program to find the sum and average of 4 numbers using function?
(4x5=20)