KEMBAR78
PPS Using C Question Bank (1) .Docx-1 | PDF | Pointer (Computer Programming) | Matrix (Mathematics)
0% found this document useful (0 votes)
57 views6 pages

PPS Using C Question Bank (1) .Docx-1

Uploaded by

dbdbdvhdhdbdj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views6 pages

PPS Using C Question Bank (1) .Docx-1

Uploaded by

dbdbdvhdhdbdj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MATURI VENKATA SUBBA RAO (M.V.S.

R) ENGINEERING COLLEGE
Nadergul, Hyderabad
(An Autonomous
Institution)

Subject: Programming for Problem Solving Using C


Class: B.E-First Year​ Sem: I​ Branch: Common to All​ Acad. Yr: 2024-25
QUESTION BANK

Unit-1
Short Answer
Questions
1.​ Define algorithm and flowchart. Differentiate between them.
2.​ Differentiate between compiler and interpreter.
3.​ Convert the following into binary,octal and hexadecimal systems
a.​ (45)10​ b. (67)10
4.​ Convert the following into decimal system
a.​ (101101)2​ b. (10101.101)2​ c. (1273)8​ d. (3d4ab)16
5.​ Convert the following into octal and hexadecimal systems
a.​ (100011101)2​ b. (1110101010)2
6.​ List out data types and their sizes in C.
7.​ What is type casting? List out its types. Give an example for each.
8.​ What is an identifier? Mention its rules.
9.​ Express the following mathematical expression in C
language. 4x3+(6y2/bx2y)-3xy2
10.​Evaluate the following C expressions.
a.​ 4+6*(12%3)>2^6/2-3
b.​ 6>>2*(3&&2/4)+8&2-3
11.​List out any four format specifiers and escape sequence characters.

Long Answer Questions


1.​ Draw and explain the block diagram of a computer system.
2.​ Draw and explain the execution phases in C programming.
3.​ Explain the structure of the C program.
4.​ Discuss in detail about any Five operators in C.
5.​ Explain about C-Tokens with examples.
6.​ Explain operator precedence and associativity.
7.​ Write an algorithm and draw flowchart for computing simple interest.
8.​ Write an algorithm and draw flowchart for computing roots of quadratic equations.
9.​ Write an algorithm and draw flowchart to check whether a given number M is divisible
by N or not.
10.​Write an algorithm and draw flowchart to check whether a given number is positive or
negative.
C Programs

1.​ Write a program to demonstrate switch statement.


2.​ Write a program to demonstrate type casting.
3.​ Write a program to find the roots of a quadratic equation.
4.​ Write a program to find the distance between two points (x1,y1) and (x2,y2).
5.​ Write a program to display the size of any six data types.
6.​ Write a program to display “Hello World” without putting a semicolon to printf().
Unit-2

Short Answer Questions

1.​ Differentiate between break and continue


2.​ Differentiate between while and do-while
3.​ What is the use of the “goto” keyword? Give an example.
4.​ List out control statements in C.
5.​ Define array. List out the types of arrays. Give an example for each.
6.​ What are the applications of arrays?
7.​ What is the use of the “return” keyword? Give an example.
Long Answer Questions
1.​ Explain in detail about control statements in C.
2.​ Write an algorithm for linear search.
3.​ Write an algorithm for binary search.
4.​ Write an algorithm for selection sort.
5.​ Write an algorithm for bubble sort.

C Programs
1.​ Write a program to display first N even and odd numbers.
2.​ Write a program to check if a given number is Palindrome or not.
3.​ Write a program to generate prime numbers between M and N.
4.​ Write a program to check if a given number is Armstrong or not.
5.​ Write a program to display first N numbers in fibonacci series.
6.​ Write a program to read a 1-d array of N elements and find the biggest,smallest element.
7.​ Write a program to find the sum and subtraction of N elements in a 1-d array.
8.​ Write a program to find the sum of two matrices using a 2-d array.
9.​ Write a program to find multiplication of two matrices using a 2-d array.
10.​Write a program to find the transpose of a matrix using a 2-d array.
11.​Write a program to implement linear search.
12.​Write a program to implement binary search.
13.​Write a program to implement selection sort.
14.​Write a program to implement bubble sort.
15.​Write a program to find the second largest and smallest number in a 1-d array.
Unit-3
Short Answer
Questions

1.​ Define string.how to declare and initialize a string?


2.​ Differentiate between character array and string.
3.​ List out any 5 built-in string handling functions.
4.​ What is the use of “static” keyword?
5.​ Define function. What are the properties of function in C.
6.​ What is the use of “void” keyword?
7.​ Differentiate between call by value and call by address.

Long Answer Questions


1.​ Explain any four string handling functions in C. Write a program for the same.
2.​ How to pass and access an array from a function? Explain with an example program.
3.​ Discuss about parameter passing techniques.
4.​ Discuss about storage classes in C.
C Programs
1.​ Write a program to find the length of a given string without using built-in functions.
2.​ Write a program to count the number of vowels and consonants in a given string.
3.​ Write a program to convert a given string into uppercase.
4.​ Write a program to swap the case of the given string.
5.​ Write a program to demonstrate call by value and call by address.
6.​ Write a program to pass an array to a function and find the sum of array elements.
7.​ Write a program to implement linear search using passing arrays to function.
8.​ Write a program to implement binary search using passing arrays to function.
9.​ Write a program to implement bubble sort using passing arrays to function.
10.​Write a program to implement selection sort using passing array to function.
Unit-4
Short Answer Questions
1.​ Define recursion.
2.​ Can we call the main() function recursively? Justify your answer with proper explanation.
3.​ Differentiate between recursion and iteration.
4.​ Define structure. How to declare and initialize it? Give an example.
5.​ Define union.Differentiate between structure and union.
6.​ Differentiate between structure and array.
7.​ What is the difference between “if” and “#if” ?
8.​ What is a macro? Why is it used? Give an example.
Long Answer Questions
1.​ Write short notes on Nested structures and arrays of structures.
2.​ Write short notes on preprocessor directives.
C Programs
1.​ Write a program to find gcd of two given numbers m,n using recursion.
2.​ Write a program to find fibonacci series up to given number N using recursion.
3.​ Write a program to find the sum of digits of a given number using recursion.
4.​ Write a program to read 3 numbers N1,N2,N3 and
a.​ Find factorial of N1
b.​ Find sum of the digits of N2
c.​ Find the sum of natural numbers up to N3.
d.​ Check the sum of N1,N2,N3 is a prime number or not
5.​ Write a program to create an employee structure, pass structure to a function, read
and display employee details using function.
6.​ Write a program to create a structure to read and display 5 student (rollno, name,
course, marks) details. Apply an array of structure to store 5 students.
7.​ Write a program to create a union to read and display 5 book (bookId, bookName, author,
price) details. Apply an array of union to store 5 books.
Unit-5

Short Answer Questions

1)​ What is a pointer? What are the uses of pointers?


2)​ What is a generic pointer? (OR) What is a void pointer?
3)​ How to declare and initialize a pointer? Explain with an example.
4)​ What is a NULL pointer? Give an example.
5)​ What is a double pointer? Give an example.
6)​ Differentiate between call by value and call by address.
7)​ What is the use of a File? List out file operations.
8)​ What is the use of FILE *fp;
9)​ What are command line arguments?
10)​ Define string. How to declare, initialize and access strings using a pointer?

Long Answer Questions


1)​ Discuss about pointer arithmetic.
2)​ Explain about Dynamic Memory Allocation with suitable examples.
3)​ How can arrays be accessed through a pointer? Explain with an example.
4)​ How can a structure be accessed through a pointer? Explain with an example.
5)​ What is the use of self referential structure? Explain with an example.
6)​ Discuss the array of pointers.
7)​ How pointers can be passed to a function? Explain.
8)​ Explain File modes in detail.
9)​ Explain the functions used for random accessing of files.
10)​ How to access strings using a pointer? Explain with an example.

C Programs
1)​ Write a program to implement pointer arithmetic.
2)​ Write a program to demonstrate call by address.
3)​ Write a program to find the biggest, smallest and sum of elements using a pointer to array.
4)​ Write a program to implement dynamic memory allocation.
5)​ Write a program to open and write some data to a file.
6)​ Write a program to open and write some data to a file using command line arguments.
7)​ Write a program to open and read some data from a file.
8)​ Write a program to open and read some data from a file using command line arguments.
9)​ Write a program to copy data from one file to another file.
10)​ Write a program to copy data from one file to another file using command line arguments.
11)​ Write a program to demonstrate random accessing of files.
12)​ Write a program to open and read the data from the file in reverse order.

You might also like