Sie sind auf Seite 1von 1

C Programming Assignments @ SunBeam Infotech

If-Else, Loops, Switch, Functions


1. Scan a 4-digit number from user. Reverse and display it. Also check whether number if palindrome or not. A
number is said to be palindrome if reversed number is same as original number.
2. Display tables of 11 to 20 in tabular format.
3. Input an alphabet from the user and display pattern as follows. For example: if user enters F, then pattern
should be :
A B C D E F E D C B A
A B C D E
E D C B A
A B C D
D C B A
A B C
C B A
A B
B A
A
A
4. Write a function to swap two numbers. Numbers swapped should be reflected in main() function.
5. Write a power function base index. Try function in both ways i.e. recursive and non-recursive.
6. Accept a three digit number from user and print it in words. Make proper use of functions.

Arrays, Strings, Structures, Dynamic Memory Allocation


7. Sort an array using bubble sort. Make proper use of functions.
8. Remove duplicate elements from 1-D array of integers.
9. Allocate memory for three 2x3 matrices dynamically. Input two matrices values from user. Add them and put
result into third matrix. Take care of memory leakage.
10. Accept a string from user (string may contain spaces). Reverse a string as well as case of each character in it. For
example if input is SunBeam Infotech, output should be HCETOFNi MAEbNUs.
11. Create an array of hw_item structure and sort it based on its price using selection sort. Each hw_item
contains its name, description, quantity and price.

File Handling, Bitwise Operators & Miscellaneous


12.
13.
14.
15.

Input name of source and destination file paths as command line argument and implement file copy program.
Input a number from user and display it in binary form.
Convert a number from binary to BCD and BCD to binary.
Write a macro to display a variable name and its value. Hint: use # operator.

Data Structures
16. Search a element in the array using binary search algorithm. Try with and without recursion.
17. Implement a stack and solve given postfix expression using it.
18. Implement a singly linked list of integers with operations like add first, add last, insert at position, search, delete
first, delete last, delete at position, free list, reverse list.
19. Implement a doubly circular linked list of book structure with operations like add first, add last, insert at
position, search, delete first, delete last, delete at position, free list.
20. Implement a deque using linked list.
SunBeam Infotech, Pune & Karad

Das könnte Ihnen auch gefallen