- Given any n x n matrix, write a C program to find the saddle point of the matrix. A saddle point is an element of the matrix such that it is the minimum element in its row and maximum in its column. The size and the elements of the matrix are given as user inputs. In case the matrix does not contain a saddle point, your code should be able to determine that as well.
- Write a C program to create a number spiral of the form depicted below arranged as an n x n matrix. n is given as user input.
- Modify the above program to put only prime numbers in the number spiral. Sample:
59 | 53 | 47 | 43 | 41 |
61 | 11 | 7 | 5 | 37 |
67 | 13 | 2 | 3 | 31 |
71 | 17 | 19 | 23 | 29 |
73 | 79 | 83 | 89 | 97 |
- Write a C program to find the Kth node from the end in the singly, doubly and circular linked list?
- Write a C program with three functions: (i) Function Search(x) that search for a node containing a given data (as search keyword), (ii) Function Delete(x) that keeps the node (that has first occurrence of the given data x) and deletes the other nodes (that has rest of the occurrences of x) and then (ii) Function Swap that swaps the node (that has first occurrence of the given data) with the next node. E.g. if the list 2->9->3->8>3->5->2->3, using search(3), the program shall find the three occurrences, using Delete(3), the output is 2>9->3->8->5->2 and using swap(), the output of the program is 2->3->9->8->5->2.
- Given two numbers a and b, write a C program to find prime numbers between a and b (both a and b are included).
- Write a C program to encode a given message. The encoding algorithm first transforms every alternate character (excluding spaces) into its third successor in the series and then performs reverse operation on each word. For an example, the message have a good day will be first transformed as kaye d grog ddy and then reversed as eyak d gorg ydd. Your program should also be able to decode a given coded message into its original form i.e. if I give an encoded message it should decode the original message. Ignore the white spaces while looking for the alternate characters.
Reviews
There are no reviews yet.