APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY

Second Semester B.Tech Degree Examination July 2021 (2019 scheme)

Course Code: EST102

Course Name: PROGRAMMING IN C (Common to all programs)

(FN Session)

Max. Marks: 100

Duration: 3 Hours

PART A

Answer all Questions. Each question carries 3 Marks

1. Differentiate between system software and application software.

2. Differentiate between complier and interpreter.

3. What is the importance of precedence and associativity? Write the table for operator precedence.

4. Differentiate between 'break' and 'continue' statements.

5. Explain any 3 string handling functions using examples.

6. Write a C program to find the occurrence of each element in an array.

7. Define formal parameters and actual parameters. Illustrate with an example.

8. With examples show how:

(i) an array is passed as argument of a function.

(ii) individual elements of an array is passed as argument of a function.

9. Write any three file handling functions in C.

10. Differentiate between address operator(&) and indirection(*) operator.

PART B

Answer any one Question from each module. Each question carries 14 Marks

11. a) Explain different types of memory used in a computer.

b) Write an algorithm to find sum of digits of a number.

OR

12. Explain bubble sort with an example. Draw a flowchart and write pseudo code to perform bubble sort on an array of numbers.

13. a) Explain different data types supported by C Language with their memory requirements.

b) Write a C program to check if a number is present in a given list of numbers, If present, give location of the number otherwise insert the number in the list at the end.

OR

14. a) Write a C program to find the sum of first and last digit of a number.

b) What is type casting? Name the inbuilt typecasting functions available in Clanguage. What is the difference between type casting and type conversion?

15. a) Write a C program to perform linear search on an array of numbers.

b) Write a C progrem to reverse a string without using string handling functions.

OR

16. a) Write a C program to find the transpose of a matrix.

b) Write a C program to print number of vowels and consonants in a string.

17. a) What is the purpose of function declaration and function definition and function call? With examples illustrate their syntax.

b) Write a C program to :

(i) Create a structure containing containing the fields: Name, Price,Quantity, Total Amount.

(ii) Use separate functions to read and print the data

OR

18. a) What are different storage classes in C? Give examples for each.

b) Write a C program to find sum and average of an array of integers using user defined functions.

19. a) Explain the different modes of operations performed on a file in C language.

b) Write a program in C to copy the contents of one file into another.

OR

20. a) Explain how pointers can be passed to functions in C.

b) Explain any 5 file handling functions in C?

********


APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY

Second Semester B.Tech Degree Examination July 2021 (2019 scheme)

Course Code: EST102

Course Name: PROGRAMMING IN C (Common to all programs)

(AN Session)

Max. Marks: 100

Duration: 3 Hours

PART A

Answer all Questions. Each question carries 3 Marks

1. Differentiate between system software and application software.

2. Write an algorithm to find the largest of three numbers

3. What is the difference between assignment and equality operators?

4. What is a static variable? When should it be used?

5. Write a C program to find length of a string without using string handling functions.

6. What is an array? Illustrate using an example, how a single dimensional array is initialised.

7. Differentiate between structure and union using an example.

8. Illustrate the purpose of return statement using an example.

9. Differentiate between char name [ ] and char *name in C.

10. Explain the use of fseek() function.

PART B

Answer any one Question from each module. Each question carries 14 Marks.

11. a) Draw a flowchart to find the factorial of a number.

b) With the help of a neat diagram explain the functional units of a computer.

OR

12 a) List five important registers in CPU. Also state the purpose of each register.

b) Write algorithm and draw flowchart to perform swapping of two numbers.

13. a) Explain arithmetic, logical and bitwise operators with examples.

b) Write a C Program to check if a given number is a strong number or not. A strong number is a number in which the sum of the factorial of the digits is equal to the mumber itself. Eg:- 145-1!+4!+5!-1+24+120-145

OR

14. a) Write C program to convert the given decimal number into binary number.

b) What do you mean by Formatted Input? Explain in detail the prototype of 'scanf()' function in C including its argument list and return type.

15. a) Explain any 4 string handling functions in C programming.

b) Write a C program to perform lincar search on an array of numbers

OR

16. a) Write a C program to find second largest element in an array.

b) Write a C program to check whether a string is palindrome or not without using string handling functions.

17. a) What are different storage classes in C? Give examples for each.

b) Write a C program to:

(i) Create a structure with fields: Name, Address, Date of birth.

(ii) Read the above details for five students from user and display the details

OR

18. a) What is recursion? Write a C program to display Fibonacci series using recursive function.

b) Write a C program to sort N numbers using functions.

19. a) Explain any 5 file handling functions in C.

b) Write a C program to reverse a string using pointers.

OR

20. a) Differentiate between array of pointers and pointer to an array.

b) Write a C program to count number of lines in a text file.

********