Sie sind auf Seite 1von 2

PROGRAMMING FOR PROBLEM SOLVING

THEORY ASSIGNMENTS
SUBJECT: PROGRAMMING FOR PROBLEM SOLVING THEORY
SUBJECT CODE:(ES-CS-201)
STREAM: CE+1/2ME 2ND SEMESTER (2019)

Assignment 1:
1. What is recursion? Explain with example. Write down differences between recursion and
iteration.
2. Write a C program to find out factorial of a given number using iterative function as well as
recursive function.
3. Briefly discuss about call by value and call by reference.
4. Explain with suitable example about auto, external, static and register variables.
5. Write down differences between while and do-while.
6. Write down the differences between:
a. malloc() and calloc()
b. compiler and interpreter
c. structure and union
d. linear search and binary search
e. break and continue statements
f. void pointer and null pointer
g. binary files and text files
h. printf() and scanf() function
7. What is dynamic memory allocation. Discuss about it.
8. Discuss about
a. Algorithm
b. Flowchart
c. Macro
d. Function Prototype
e. Basic features of computer
f. Floating Point Representation
g. Linked list
h. different modes of operation regarding binary file and text file
9. Write down string functions whose prototype is defined in the header file string.h. Explain
how do they work.
10. What is ternary operator.
11. What is Ackermann function?
12. Describe the functions of different components of digital computer.
13. Write a C Program to find real root of a quadratic equation.
14. What is syntax error and logical error?
15. What is self-referential structure?
Assignment 2:
16. What is array of pointer? Give an example.
17. Write a program to find the sum of the all integers ranging from 100 to 200 and divisible by
both 2 and 3.
18. What is searching? What is sorting? Write down about quick sort and merge sort.
19. Write down about bubble sort,selection sort and insertion sort.
20. Write a C Program to convert a decimal number of arbitrairy digits to its equivalent binary
number using 1-D array. Also convert that particular number into hexadecimal and octal
using two different 1-D arrays.
21. What is subscripted variable. Explain that “C does not support bound checking”.
22. Write a C program to print size of a file.
23. Draw a flowchart to find the largest among three numbers taken as input.
24. Explain the role of the C pre-processor.
25. What is the output of following program:
#include<stdio.h>
void main(){
int x=9;
if(10) printf(“%d”,++x);
else printf(“%d”,x++);
}
26. Discuss about order of complexity.
27. What is typecasting? What is automatic type conversion?
28. Briefly describe the functions of memory unit and discuss its various parts.
29. What are the functions of CPU? How does the CPU perform?
30. State the basic features of any structured programming language.
31. Write a flowchart to find the sum of the first n prime numbers, where n should be given by
the user.
32. Discuss about relational operator, logical operator and bitwise operator.

Das könnte Ihnen auch gefallen