KKR & KSR INSTITUTE OF TECHNOLOGY & SCIENCES
(Autonomous)
(Approved by AICTE, New Delhi & Affiliated to JNTUK, Kakinada,
Accredited by NAAC with “A” Grade & Accredited by NBA)
VINJANAMPADU, GUNTUR-520017
UNIT WISE QUESTION BANK
Class: I B.Tech I Semester Civil & Mechanical A/Y: 2020-21
Subject: Programming For Problem Solving Using C Faculty: M. Rajesh Reddy, Asst. Prof- CSE
UNIT-1
1. Explain different components of hardware & different types of software.
2. Discuss about various levels of programming languages.
3. Explain the process of creating and running a program
4. Explain different types of number system & their conversions with relevant examples
5. How to store real and integer numbers in a computer.
6. Explain the structure of C program with an example
7. Learn all the basic c – programs
8. Describe different types of C tokens.(keywords, identifiers, constants)
9. Explain different data-types in C.
10. Explain input/output functions
11. Explain type casting with relevant examples
12. Define expression &evaluate the expression by using precedence & associativity
UNIT-2
1. Explain various operators in C with examples
2. Explain one way & two way selection statements with example. (if, if-else, nested if-else)
3. Write a C program to find largest of three numbers
4. Explain multi-way selection statements with example. (if-else if ladder, switch)
5. Write a C program to implement switch statement?
6. Explain Event Controlled and Counter Controlled loops with example
7. Explain pre-test loops with example (while, for)
8. Write a C program to find whether given number is palindrome or not
9. Explain post-test loops with example (do-while)
10. Write a C program to find factorial of a given number.
11. Explain nested loops with an example
12. Explain unconditional statements with examples. (break, continue)
UNIT-3
1. What is Array? Discuss about the initialization and accessing of array elements in one dimensional and
two-dimensional arrays.
2. What are the disadvantages in implementing arrays in C language? Discuss about implementing of
multi-dimensional arrays in C language.
3. Explain the following string handling functions with examples:
(i) strlen( ) (ii) strcpy( ) (iii) strcat( ) (iv) strcmp( ) (v) strrev( )
4. Discuss about array of strings with an example
5. Write a short note on string data conversion
KKR & KSR INSTITUTE OF TECHNOLOGY & SCIENCES
(Autonomous)
(Approved by AICTE, New Delhi & Affiliated to JNTUK, Kakinada,
Accredited by NAAC with “A” Grade & Accredited by NBA)
VINJANAMPADU, GUNTUR-520017
6. Write a short note on typedef with examples
7. Explain about enumerated types with examples
8. What is a structure? Discuss about the declaring, initialization and accessing of structure members with
an example.
9. Discuss about pointer to structure with an example
10. Discuss about nested structures with an example
11. Discuss about array of structures with an example
12. What is a union? Discuss about the declaring, initialization and accessing of union members with an
example.
13. Explain the differences between structure and union
UNIT-4
1. What is pointer? Explain how to declare, initialize and dereference a pointer with examples.
2. List the advantages and disadvantages of pointers
3. Explain how pointers and arrays are related with example.
4. Explain pointer arithmetic with relevant examples.
5. Discuss about pointer to pointer with example.
6. Explain how pointers and strings are related with examples.
7. Explain how pointers and 2-D arrays are related with example.
8. Explain the concept of array of pointers with example.
9. Explain various dynamic memory management functions with relevant examples.
10. What is preprocessor directive? List and explain various pre-processor directives with examples.
UNIT-5
1. Define function. Explain the steps involved in creating user-defined function with an example
2. State the types of functions depending upon the categories of arguments and return statements with
examples.
3. Explain parameter passing techniques with examples
4. What is recursion? Explain the process of recursive function call with an example.
5. Explain about various storage classes with relevant examples
6. Explain how to pass arrays to function with example
7. Explain how to pass pointers to function with example
8. Explain how to pass strucrure to function with example
9. Discuss about command line arguments with an example
10. Discuss about formatting input and output functions with examples ( fprintf( ), fscanf( ) functions)
11. What is a file? Explain different file operations with an example
12. Explain different file opening modes with examples
13. Discuss about character input and output functions with examples (getc( ), putc( ), fgetc( ), fputc( ), feof(
) functions)
14. Discuss about standard library functions of Binary files with examples *(fread( ), fwrite( ) functions)
15. Discuss about Random Access I/O functions with examples (fseek( ), ftell( ), rewind( ) functions)
KKR & KSR INSTITUTE OF TECHNOLOGY & SCIENCES
(Autonomous)
(Approved by AICTE, New Delhi & Affiliated to JNTUK, Kakinada,
Accredited by NAAC with “A” Grade & Accredited by NBA)
VINJANAMPADU, GUNTUR-520017
PROGRAMS
UNIT-3
1. Write a program in C to print all unique elements in an array.
2. Write a program in C to find maximum and minimum elements in an array
3. Write a program in C to print the array elements in reverse order
4. Write a program in C to sort elements of array in ascending order.
5. Write a program in C for addition of two Matrices
6. Write a program in C for multiplication of two Matrices
7. Write a program in C to find transpose of a given matrix.
8. Write a program in C to find length of a string using string library functions
9. Write a program in C to copy one string to another string using string library functions
10. Write a program in C to concatenate two strings using string library functions
11. Write a program in C to compare two strings using string library functions
12. Write a program in C to print individual characters of string in reverse order using string library
functions
13. Write a program in C to find length of a string without using string library functions
14. Write a program in C to copy one string to another string without using string library functions
15. Write a program in C to concatenate two strings without using string library functions
16. Write a program in C to compare two strings without using string library functions
17. Write a program in C to print individual characters of string in reverse order without using string library
functions
18. Write a C program to count number of lines, words and characters in a given text without using any
string handling functions.
19. Write a C program to count number of vowels present in a sentence.
20. Write a C Program to sort an array of strings.
UNIT-4
1. Write a program to demonstrate the use of & (address) and *(de-reference) operators.
2. Write a program to add two numbers using pointers.
3. Write a program in C to count the number of vowels and consonants in a string using a pointer.
4. Write a program to find the largest element of array using Dynamic Memory Allocation.
5. Write a C program to find the sum and mean of all elements in an array using Dynamic Memory
Allocation.
6. Write a C Program to Store Information Using Structures with Dynamically Memory
7. Write a program to show the usage of #define directive.
8. Write a program to show the usage of #undef directive.
9. Write a program to show the usage of #if and #else directives.
10. Write a program to show the usage of #ifdef directive.
11. Write a program to show the usage of #ifndef directive.
KKR & KSR INSTITUTE OF TECHNOLOGY & SCIENCES
(Autonomous)
(Approved by AICTE, New Delhi & Affiliated to JNTUK, Kakinada,
Accredited by NAAC with “A” Grade & Accredited by NBA)
VINJANAMPADU, GUNTUR-520017
UNIT-5
1. Write a program in C to swap two variables using pass by address mechanism
2. Write a program in C to convert decimal number to binary number using function.
3. Write a program in C to check given number is prime or not using function
4. Write a program in C to get the largest element of an array using the function
5. Write a program in C to find sum of N natural numbers using recursion
6. Write a program in C to find factorial of a given number using recursion
7. Write a program in C to find GCD of given two numbers using recursion
8. Write a program in C to print first N terms of Fibonacci series using recursion
9. Write a program in C to append multiple lines at the end of a text file.
10. Write a program in C to read and display content of a file
11. Write a program in C to copy a file in another name.
12. Write a program to count and display total number of lines, words, characters in a file
13. Write a program to read an employee record and store it in a file.
14. Write a program to show the use of fseek( ), ftell( ), rewind( ) functions.