Showing posts with label Data Structures. Show all posts
Showing posts with label Data Structures. Show all posts

Tuesday, December 16, 2008

More Basic Data structures using C questions

0
Can you construct a tree using postorder and preorder traversal?Write C code for iterative preorder, inorder and postorder tree traversals
Write C code to count the number of leaves in a tree
Write C code to search for a value in a binary search tree (BST).
Write a C program to delete a node from a Binary Search Tree?
Write C code to implement level order traversal of a tree.
Write C code to check if a given binary tree is a binary search tree or not?
Write a C program to create a copy of a tree
Write C code to implement the preorder(), inorder() and postorder() traversals. Whats their time
Write C code to return a pointer to the nth node of an inorder traversal of a BST.
Write a C program to create a mirror copy of a tree (left nodes become right and right nodes
Write a C program to compute the maximum depth in a tree?
Write a C program to find the mininum value in a binary search tree.
Write C code to determine if two trees are identical
Write a C program to delete a tree (i.e, free up its nodes)
Write a C program to determine the number of elements (or size) in a tree.
Write a C program to find the depth or height of a tree.
Write your own trim() or squeeze() function to remove the spaces from a string.
Write a program to print numbers from 1 to 100 without using loops!
How to generate prime numbers? How to generate the next prime after a given prime?
How to add two numbers without using the plus operator?
Write a program to check if the stack grows up or down
Write a program to merge two arrays in sorted order, so that if an integer is in both the arrays, it
Given two strings A and B, how would you find out if the characters in B were a subset of the
How can we sum the digits of a given number in single statement?
Write code to round numbers
Write a program to have the output go two places at once (to the screen and to a file also)
How do you find out if a machine is 32 bit or 64 bit?
Is there a way to multiply matrices in lesser than o(n^3) time complexity?
Write a simple piece of code to split a string at equal intervals

C & Data Structures basic questions


Can we use variables inside a switch statement? Can we use floating point numbers? Can we use

What purpose do #if, #else, #elif, #endif, #ifdef, #ifndef serve?

Whats wrong with #define myptr int *?

Can goto be used to jump across functions?

Is C case sensitive (ie: does C differentiate between upper and lower case letters)?

What is the difference between the & and && operators and the | and || operators?

What is a forward reference?

Why can’t you nest structure definitions?

What is type checking?

What is the difference between a statement and a block?

What does the term cast refer to? Why is it used?

What do lvalue and rvalue mean?

Is ++i really faster than i = i + 1?

Should we use goto or not?

What is the difference between if(0 == x) and if(x == 0)?

What are #pragmas?

Is 5[array] the same as array[5]?

Does the ?: (ternary operator) return a lvalue? How can I assign a value to the output of the

Whats wrong with the expression a[i]=i++; ? Whats a sequence point?

Whats short-circuiting in C expressions?

Will C allow passing more or less arguments than required to a function.

How do I pass a variable number of function pointers to a variable argument (va_arg) function?

How can I pass the variable argument list passed to one function to another function.

What does the error, invalid redeclaration of a function mean?

If I have the name of a function in the form of a string, how can I invoke that function?

With respect to function parameter passing, what is the difference between call-by-value and call-

How can I write a function that takes a variable number of arguments? What are the limitations

Can we declare a function that can return a pointer to a function of the same type?

How to declare an array of N pointers to functions returning pointers to functions returning

What are inline functions?

Friday, October 24, 2008

Data Structures

Data Structures Find the C Source code impleentation of Trees, Lists, Queses, Arrays, Searching and sorting mehothd More details.....

Your Title