Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CS3251 / PROGRAMMING IN C (R-2021)

COACHING QUESTIONS

PART-A QUESTIONS

Unit-I

1. What are the types of I/O statements available in ‘C’?


2. What is the difference between pre increment and post increment?
3. Distinguish between while and do-while statement.
4. Distinguish between character and string
5. What are keywords? Give an example.
6. What is the difference between the statements a=5 and a==5 in language C?
7. What is the use of preprocessor directives?
8. Show the use of ternary or conditional operator.
9. Write a code to find maximum of three numbers.
10. Differentiate break and continue statement in C programming Languages.

Unit-II
1. Write down the syntax for array declaration.
2. Distinguish between one dimensional and two dimensional arrays.
3. Define Strings.
4. Differentiate between Linear search and Binary search.
5. Define a float array of size 5 and assign 5 values to it.
6. What is the purpose and prototype of the function ‘strcpy’?
7. Give some examples of string functions.
8. How is a character string declared?
9. Define array.
10. Give an example for initialization of string array.
Unit-III
1. Define function: Write the syntax for function declaration
2. What is meant by function prototype? List out the types.
3. What is meant by pointer?
4. List out the pointer arithmetic operations
5. Write short notes on Function with arguments and no return values.
6. Define the term recursion in language C.
7. What is the relation between the operators ‘&’ and ‘*’ in C pointers?
8. Specify the advantages of functions.
9. How is pointer arithmetic done?
10. Mention the advantages of pass by reference.

Unit-IV
1. What is self referential structure?
2. How typedef is used in structure?
3. Point out the meaning of Dynamic memory allocation.
4. Summarize the different types of memory allocation functions
5. Define union with syntax?
6. In language C can we allocate memory dynamically? How?
7. What are the key differences between structure and union?
8. Give example for nested structure.
9. Compare and contrast a structure with an array?
10. What is the purpose of unions in C?

Unit-V
1. What is a File?
2. Distinguish between Sequential access and Random access
3. Why do we use command line arguments in C?
4. What is meant by command line argument.? Give an example
5. Write about the input /output functions.
6. What are two main ways a file can be organized?
7. List the file operations in C.
8. Give an example for fseek().
9. What does argv and argc indicate in command line arguments?\
10. What will be the impact if ‘fclose()’ function is avoided in a file handling C
program?
PART-B QUESTIONS

Unit-I

1. Explain the different types of operators.


2. Describe the decision making statements and looping statements in C with an
example.
3. i)Discuss about the constants, expressions and statements in ‘C’.
ii)Write a C program to check whether a number is prime or not.
4. Describe the various input and output statements in C with suitable examples.
5. Draw the structure of a C program and explain each part in detail.
6. i) Explain different data types in ‘C’ with examples.
ii) Write a C program to check the integer is palindrome or not.

Unit-II

1. Explain one dimensional arrays with suitable example?


2. Write a c program to find the matrix addition using two dimensional arrays?
3. Write a C program for Determinant and transpose of a matrix.
4. Describe the following functions with examples. (string handling functions)
i) strlen() (ii) strcpy() (iii)strcat() (iv)strcmp()
5. Write a C program to calculate mean and median for an array of elements.
6. i) Differentiate binary search from linear search.
ii) Write a C program to compare two strings without using the function
‘strcmp()’

Unit-III
1. Explain the purpose of a function prototype. And specify the difference between
user defined function and built in function.
2. What are the applications of recursive function? Computation of Sine series
using C program.
3. Explain in detail about Pass by Value and Pass by reference.(Parameter passing)
4. Describe about pointers and their operations that can be performed on it.
5. Explain the concept of recursion with an example program.
6. What is modular programming? Explain in detail.
Unit-IV
1. Write a C program using structures to prepare the students mark statement.
2. Explain about structure and union with suitable example.
3. Give an example for nested structure and explain how the structure members
are accessed in a nested structure with an example.
4. i) Explain array of structure with eg.
ii)Write short on storage classes in C..
5. i) Why is singly linked list called as self referential structure? Explain.
ii) What is dynamic memory allocation? Explain Various C functions with
eg.
6. Define structure in C. Also specify the pointer and structure with example.

Unit-V
1. What is file? Mention different type of file accessing
2. Explain the concepts of sequential access. Finding average of numbers stored
in sequential access file
3. Write about the Command line arguments.
4. Explain the concepts of random access. Write a C Program Transaction
processing using random access files.
5. Write a C Program to calculate the factorial of a number by using the command
line argument.

SUBJECT INCHARGE HOD IQAC PRINCIPAL

You might also like