0% found this document useful (0 votes)
15 views4 pages

Final CP QB

The document is a question bank for C Programming, detailing various questions categorized into 2 marks, 4 marks, and 8 marks. It covers topics such as tokens, flowcharts, algorithms, file operations, structures, pointers, recursion, and sorting methods. The questions aim to assess understanding and application of C programming concepts and techniques.

Uploaded by

vyaspoorva1
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)
15 views4 pages

Final CP QB

The document is a question bank for C Programming, detailing various questions categorized into 2 marks, 4 marks, and 8 marks. It covers topics such as tokens, flowcharts, algorithms, file operations, structures, pointers, recursion, and sorting methods. The questions aim to assess understanding and application of C programming concepts and techniques.

Uploaded by

vyaspoorva1
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/ 4

K. J.

Somaiya Institute of Technology, Sion, Mumbai-22


(Autonomous College Affiliated to University of Mumbai)

Subject : C Programming
Question bank for ESE
2 Marks Questions:
1. Mention the different types of Tokens in “C” , and explain one of them.
2. What is flowchart? Explain use of different Symbols of flowchart.
3. What is token? Explain different tokens in C.
4. Write a C program to determine whether a given number is negative, positive or zero, using if-
else statements.
5. Explain nested if else statement with example.
6. Write algorithm to find sum of five integer numbers.
7. Define function with example.
8. Describe library function 1)strcat() 2)strlwr()
9. Describe library function 1)strlen() 2)strcpy()
10. Explain break and continue statement with example.
11. What is the difference between declaration and definition of function.
12. Why do we prefer iteration over recursion in any C program?
13. Give an example of nested structure.
14. What is structure? Write one example of structure.
15. What are the advantages and Disadvantages of Array?
16. Differentiate between Structure and Union.
17. What is file? Explain different file operations.
18. Explain different operators in c.
19. Write syntax of for loop and nested for loop.
20. Identify the types of pointers from the below two programs:

1. #include 2. #include
<stdio.h> <stdio.h>
int main(){ int main(){
int *ptr = NULL; int *p;
printf("%d", *ptr); *p=10;
return 0;} printf("%d", *p);
return 0;}
21. What are the C file operations, provide six different possible file operation function?
22. Derive the output of the below code snippet . Give proper explanation to your answer.

#include <stdio.h>
int main(){
int c = 5, no = 10;
do {
no /= c;
} while(c--);
printf (\"%d\\n\", no);
return 0;}

23. What is pointer? Write syntax to declare pointer.


24. Explain difference between while and do while loop.

4 Marks Questions:
25. What is an algorithm? Write an algorithm to check whether given number is odd or even?
26. What is the need of algorithm and mention properties of algorithms.
27. Write a program to calculate and display the sum of first n natural number using while loop.
28. Write a program in C to display n numbers of natural numbers and their sum.
29. Explain all the storage classes in C with any one example
30. Write a program to check if the user entered number is divisible by 10 or not..
31. Explain different storage classes in c.
32. Discover 4 differentiation between String and Character.
33. Write a program to find fibonnaci series upto n number using function.
34. Write a program to sort number of an array in ascending order using user defined function.
35. Write a program to sort number of an array in ascending order using user defined function.
36. Write a program to display information of 10 books using array of structure.
37. Write a program to display information of 10 students using array of structure.
38. Provide an example demonstrating the declaration and initialization of a structure named “Point”
, Also display the coordinates.

Hint : P(x,y) In mathematics a point is having two coordinates i.e. x and y.


39. Differentiate between call by value and call by reference.
40. Differentiate between Static memory allocation and Dynamic memory allocation.
41. Write a program to swap two numbers using pointer.

8 marks Questions:
42. Develop a flowchart to display whether the given year is a leap year or not?
43. Write a program that calculates the roots of quadratic equation. Draw the flowchart for it.
44. Write a program to convert a decimal number to binary format. Draw the flowchart for it.
45. What is array? Explain the various ways to initialize array using example.
46. Write a program to find length of given string and copy one string into another string using user
defined function.
47. Write a program to concatenate the given strings and check whether given string is palindrome or
not.
48. Write a program to display result of students by using nested if else.
49. Write a program to display information of player in ascending order with respect to their batting
average. Define a structure called cricket that will describe the player’s name,country name,best
score,batting average.
50. Explain the concept of nested structure with following example:
Create structure
product {cost, id, type} and
structure delivery { del_date, del_number, del_type)
51. Implement a C program to read weekday numbers and print weekday names using switch cases.
52. What is a recursive function? Write a program to find GCD of given number using recursive
function
53. Write a program to read name, id, salary, date of joining using nested structure to get the address
of an employee.
54. Write a program to display information of employees by using nested if else.
55. What is a recursive function? Write a program to find factorial of given number using recursive
function
56. Write a program for Sorting the array of numbers [10,07,08,09,01,05] , using the Quick Sort
Method. Also mention the Time complexity of it.
57. Write a program to read and store n integers in an array, where the value of n is decided by the
user.Find minimum and maximum numbers from the array.
58. Why do we need File handling in “C” , also explain the two distinct types of data files in “C”
language and explain what is "r+” and “rb+” opening mode in “C”.
59. What is an algorithm? Write an algorithm to check whether a given number is odd or even?
60. Explain dynamic memory allocation functions.

You might also like