Showing posts with label Pointers. Show all posts
Showing posts with label Pointers. Show all posts

Determinant of a matrix in C

Problem
Write a c program to find determinant of a matrix, the size should be variable

Storing numbers in a link list in decreasing order

Problem statement
Write a c program to store numbers in link list in decreasing order,
your program should also print them

Scanning numbers in link list using recursion

Problem statement
Write a c program to recursively add element in a link list
your program should also print them recursively

Printing stack using recursion

Problem statement
Write a c program to print link list using recursion

Storing numbers in link list

Problem statement
Write a c program to store values using link list, your program should store the values in order they are entered and the print the values. total number of inputs will be given by user,
for example
total number of integer you will enter 5
1
2
3
5
1
then your program should print
1
2
3
5
1
and store in the same manner only, i.e. the number which will be entered in the list will be in the last of the list

Storing numbers using link list

Problem statement
Write a c program to store numbers using link list and then print them,the new number entered should be at the top of list

Starting address of words in a line

Problem statement
Write a c program to do the following
Consider the interface of a recursive function:
int wordIndex(char *x, int ind[]).
It takes a string and an int array as parameters.
It returns the word count(i.e. the number of words in that line). The int array after
return will hold the starting indexes of words in
the string.
For Example 
Consider the string
"This string has five words".
Your program should say that this line contains 5 words,and starting address of words are 1,5,...

Reservation of train using recursion

 Problem statement
Write a c RECURSIVE program to maintain reservation list of a train using link list,your program should do the following it should take the name,age,sex as input of a passenger, there are 50 seats in the train,and you can take up to 20 waiting list.
[Click here for non recursive]

Train reservation of one train

Problem statement
Write a c program to maintain reservation list of a train using link list,your program should do the following it should take the name,age,sex as input of a passenger, there are 50 seats in the train,and you can take up to 20 waiting list.
[click here for recursive]

Swaping numbers using pointers

Problem statement
Write a c program to Swap the values of two numbers using pointer

Sum of Array Using Pointer

Problem Statement
Read N integers and store them in an array A,
and find the sum of all these elements using pointer

Circulate an Array

problem statement
Write a C program to read an array of size n and also read an integer m. Perform left circular rotation of the array elements
 m times. Print the array elements after each rotation.
      Prototypes
       ******************************
       int read_count();
       void read_array(int a[], int size);
       void print_array(int a[], int size);
       void rotation(int a[], int size, int m);  // m is the number of rotations

   Example:
         Input :
            Enter the value of n : 4
            Enter the array elementes : 1 2 3 4
            Enter no. of rotations : 3

         Output:
                 2 3 4 1
                 3 4 1 2
                 4 1 2 3