You are on page 1of 2

1. 2. 3. 4. 5. 6.

Write a C program to test whether the given system is Little Endian or Big Endian. Write a C program to find if the stack of a given system grows upwards or backwards. Write a C program to test if the two given addresses lie in the same page. What is stack overflow. Write a C program to demonstrate it. What is segmentation fault. Write a C program to demonstrate one. What is 'extern' and volatile. Write a C program to show usage od 'volatile'.

7. 8. 9. 10. 11. 12.

Write a C program to detect loop in a linked list. Write a C program to find nth element of a given linked list. Write a C program to reverse a linked list using recursion. Write a C program to delete an element from a linked list in one traversal. Write a C program to find number of bits that are 'on' in a given number. Write a program to print all possible combinations of string 'abcd'.

13.

Write a code to remove duplicate letters from a string. Discuss complexity of the problem.

14. There is an array of N elements which should contain numbers from 1 to N. But one of these numbers are missing. Find the missing number. Assume that at the place of missing number there is some other number between 1 to N. Write a C code for it. 15. There is an array of N numbers having numbers kept in ascending order. But two number of this array got swapped. Find the index of both numbers that got interchanged. Write a C code for this. 16. There is linux shell command called 'wc' (look into it's man page for detail). Write a program that behaves as 'wc' (implement main features, ignore whatever you wish). 17. 18. Write a function similar to 'atoi'. Write a code to find depth of a n-ary tree.

19.

There is structure in c:-

struct uvfs_inode { int inode_number;

struct vfs_inode *inode; }

Given:struct uvfs_inode my_in; tmp = my_in.inode;

Write a function (consider C programming language) such that it takes 'tmp' as it's argument and returns address of 'my_in'. Prototype of the required function:-

struct uvfs_inode *get_container(void *);

You might also like