Question Bank Unit I and II
Question Bank Unit I and II
Question Bank Unit I and II
Engineering College
(An Autonomous Institution)
RSM Nagar, Kavaraipettai – 601206.
Question Bank
Part A Unit I
#include <stdio.h>
int main()
{
int i = 2; int j = 10;
{
int i = 4; int j = 5;
printf("%d%d",i,j);
}
printf("%d%d",i,j);
return 0;
}
23. What is the purpose of printf() and scanf() in C Program?
24. What is an array?
25. How array is declared and Initialised?
Part A Unit II
1. Define Pointer
2. What are the uses of a pointer?
3. Write a program in C to show the basic declaration of pointer.
4. How pointer variables are initialized ?
5. What is pointer to a pointer.
6. Write a program in C to demonstrate how to handle the pointers in the program
7. Write a program in C to demonstrate the use of &(address of) and *(value at address)
operator.
8. Represent a two-dimensional array using pointer ?
9. What is pointer arithmetic? How is it performed? Support your answer with example.
10. How will define a function in C? Defining a Function.
11. What are the steps in writing a function in a program?
12. What is meant by Recursive function?
13. Write a program in C to find the square of any number using the function
14. If a = 10.What is the output of this statement printf("%d", (a++))?
15. Which statement is efficient and why? x=x+1; or x++; ?
16. What is the result after execution of the following code if a = 10, b = 5, and c = 10?
17. Write a C program to print hello world without using a semicolon (;).
18. What is a function?
19. What are enumerations?
20. What is the use of typedef?
21. What is a structure?
22. How to Declare a members in Structure?
23. 5. What is a union?
24. What are the differences between structures and union?
25. 7. What are the differences between structures and arrays?
Part B Unit I
1. Explain data types supported by C language in detail with examples
2. Explain how variables are declared in C?Give the rules to name a variable.
3. Write a C Program to Illustrate Conditional Operator
4. Explain about goto, continue, break, and return statements in C
5. Write a program in C to check a given number is even or odd.
6. Write a C program to find diameter, circumference and area of circle.
7. Write a C program to find maximum and minimum between two numbers.
8. Write a C program to check whether a number is even or odd.
9. Write a C program to find all prime numbers between given interval.
10. Write a program to calculate GCD of two numbers.
11. Write a program to add two Matrices using Two Dimensional Array.
12. Write a program to Subtract two Matrices using Two Dimensional Array.
13. Explain Storage Class Specifier in detail
14. Explain Iterative Statements in detail
15. Explain different types of if Statements in detail
16. Explain switch .... case construct in detail with an example
17. Write a C program to sort names in alphabetical order
18. Write a C programming to find out maximum and minimum of some values stored in an
array.
PartB Unit II
1. Write a program in C to add two numbers using pointers.
2. What is a function? Why we use functions in C language? Give an example.
3. Distinguish between Built in functions and User defined functions in C and Explain with
examples.
4. How a User Defined Functions is created in C. Explain with Example.
5. Explain the various categories of user defined functions in C with examples?
6. Write a program in C to check whether a number is a prime number or not using the function.
7. Write a C program to Create a function to print Welcome without any return data to main()
function
8. What is recursive function? Write syntax for recursive functions.
9. Write a program in C to check armstrong and perfect numbers using the function.
10. How to Pass Array Individual Elements to Functions? Explain with example program.
11. Write a C program to Create a function to display square of 5 without any return data to
main() function
12. Write a C program Create a function to receive number 5 as parameter and return square of it
to main function. Display the return value using printf() inside main() function.
13. Write a C program to Get one user input number and pass it to a function to display the same
by adding 10 to its value.