Friday, December 28, 2007
Write a C program which produces its own source code as its output
Posted by Admin at 10:37 AM 0 comments
Labels: Adhoc Programs
Write a program to merge two arrays in sorted order, so that if an integer is in both the arrays, it gets added into the final array only once.
Posted by Admin at 10:36 AM 0 comments
Labels: Arrays
Write a program to print a square matrix helically.
Posted by Admin at 10:36 AM 0 comments
Labels: Adhoc Programs
Write a program generate permutations.
Posted by Admin at 10:34 AM 0 comments
Labels: Adhoc Programs
Write a C program generate combinations
Posted by Admin at 10:32 AM 0 comments
Labels: Adhoc Programs
Write a C program to solve the 8 queens problem
Posted by Admin at 10:32 AM 0 comments
Labels: Adhoc Programs
Write pseudocode to compare versions (like 115.10.1 vs 115.11.5).
Posted by Admin at 10:32 AM 0 comments
Labels: Adhoc Programs
Write C code to check if an integer is a power of 2 or not in a single line?
Posted by Admin at 10:31 AM 0 comments
Labels: Adhoc Programs
Write a program to add two long positive numbers (each represented by linked lists)
Posted by Admin at 10:28 AM 0 comments
Labels: Linked Lists
Write a program to check if the stack grows up or down
Posted by Admin at 10:26 AM 0 comments
Labels: Adhoc Programs
Write a C program to check for palindromes
Posted by Admin at 10:26 AM 0 comments
Labels: Adhoc Programs
Write C code to dynamically allocate one, two and three dimensional arrays
Posted by Admin at 10:26 AM 0 comments
Labels: Arrays
Write code to remove duplicates in a sorted array.
Posted by Admin at 10:23 AM 0 comments
Labels: Arrays
What are the elements of Object Oriented Design
Posted by Admin at 7:14 AM 0 comments
Labels: Object Oriented Design
obtain 24 from four 0's. This time you can use any valid mathematical operation.
Posted by Admin at 7:09 AM 1 comments
Labels: Puzzles
obtain 24 using the numbers 1,3,4,6 once each and only the operations +,-,/,*
Posted by Admin at 7:05 AM 0 comments
Labels: Puzzles
Why do we need inline function, when we do have macros ?
Posted by Admin at 7:02 AM 0 comments
Labels: C++
A full N-ary tree has M non-leaf nodes, how many leaf nodes does it have?
Posted by Admin at 6:40 AM 0 comments
Labels: Trees
Write a program to create a mirror copy of a binary tree (left nodes become right and right nodes become left)
Posted by Admin at 6:39 AM 0 comments
Labels: Trees
Write code to check if a given binary tree is a binary search tree or not?
Posted by Admin at 6:39 AM 0 comments
Labels: Trees
Find the closest ancestor of two nodes in a binary tree.
Posted by Admin at 6:37 AM 0 comments
Labels: Trees
Given an expression binary tree, evaluate the expression and obtain a paranthesized form of the expression
Posted by Admin at 6:35 AM 0 comments
Labels: Trees
How many different binary trees can be constructed using n nodes?
Posted by Admin at 6:34 AM 0 comments
Labels: Trees
Construct a binary tree given its inorder and preorder traversal strings. Similarly construct a binary tree given its inorder and post order traversal
Posted by Admin at 6:33 AM 0 comments
Labels: Trees
Can you construct a binary tree using postorder and preorder traversal?
Posted by Admin at 6:23 AM 0 comments
Labels: Trees
Write a program to create a copy of a binary tree
Posted by Admin at 6:21 AM 0 comments
Labels: Trees
Write code to implement level order traversal of a binary tree
Posted by Admin at 6:21 AM 0 comments
Labels: Trees
Write code for iterative preorder, inorder and postorder tree traversals
Posted by Admin at 6:21 AM 0 comments
Labels: Trees
Write code for recursive preorder, inorder and postorder tree traversals
Posted by Admin at 6:19 AM 0 comments
Labels: Trees
Write a code to count the number of leaves in a binary tree
Posted by Admin at 6:11 AM 0 comments
Labels: Trees
Write C code to search for a value in a binary search tree (BST)
Posted by Admin at 6:08 AM 0 comments
Labels: Trees
Write a C program to compute the maximum depth in a tree?
Posted by Admin at 6:03 AM 0 comments
Labels: Trees
Write C code to determine if two binary trees are identical
Posted by Admin at 6:01 AM 0 comments
Labels: Trees
Write a C program to swap two variables without using a temporary variable
Posted by Admin at 1:39 AM 0 comments
Labels: Adhoc Programs
Write a program to generate all permuatation of a string
Posted by Admin at 1:39 AM 0 comments
Labels: Strings
Write a program to generate all subsstring of a input string
Posted by Admin at 1:39 AM 0 comments
Labels: Strings
Write a function to determine the number of elements (or size) in a tree
Posted by Admin at 1:38 AM 0 comments
Labels: Trees
Write a C program to find the depth or height of a tree.
Posted by Admin at 1:38 AM 0 comments
Labels: Trees
Write a code to split a string at equal intervals
Posted by Admin at 1:38 AM 0 comments
Labels: Strings
How to generate prime numbers? How to generate the next prime after a given prime?
Posted by Admin at 1:38 AM 0 comments
Labels: Adhoc Programs
Write a program to check if a given year is a leap year or not?
Posted by Admin at 1:38 AM 0 comments
Labels: Adhoc Programs
Write a C progam to convert from decimal to any base (binary, hex, oct etc...)
Posted by Admin at 1:38 AM 0 comments
Labels: Adhoc Programs
Write a C program for calculating the factorial of a big number
Posted by Admin at 1:38 AM 0 comments
Labels: Adhoc Programs
Write a C program for calculating the factorial of a number
Posted by Admin at 1:38 AM 0 comments
Labels: Adhoc Programs
Write a C program to delete a node from a Binary Search Tree
Posted by Admin at 1:37 AM 0 comments
Labels: Trees
Write C code to return a pointer to the nth node of an inorder traversal of a BST
Posted by Admin at 1:37 AM 0 comments
Labels: Trees
Write a C program to find the mininum/maximum value in a binary search tree.
Posted by Admin at 1:37 AM 0 comments
Labels: Trees
Write a C program to find the length of LCS ( longest common subsequence ) of two given strings
Posted by Admin at 1:24 AM 0 comments
Labels: Strings
Write a C program which does wildcard pattern matching algorithm
Posted by Admin at 1:24 AM 0 comments
Labels: Strings
Write a C program to reverse the words in a sentence in place
Posted by Admin at 1:23 AM 0 comments
Labels: Strings
Implement the memmove() function. What is the difference between the memmove() and memcpy() function
Posted by Admin at 1:23 AM 0 comments
Labels: Strings
Write your own C program to implement the atoi() function Updated
Posted by Admin at 1:23 AM 0 comments
Labels: Strings
Write C code to implement the strstr() (search for a substring) function
Posted by Admin at 1:23 AM 0 comments
Labels: Strings
Write C programs to implement the toupper() and the isupper() functions
Posted by Admin at 1:23 AM 0 comments
Labels: Strings
Write a C program to implement your own strdup() function
Posted by Admin at 1:23 AM 0 comments
Labels: Strings
Write a C program to implement the strlen() function
Posted by Admin at 1:23 AM 0 comments
Labels: Strings
Thursday, December 27, 2007
How would you detect a loop in a linked list?
Posted by Admin at 1:30 PM 1 comments
Labels: Linked Lists
Write a C program to remove duplicates from a sorted linked list
Posted by Admin at 1:30 PM 0 comments
Labels: Linked Lists
How would you find out if one of the pointers in a linked list is corrupted or not?
Posted by Admin at 1:30 PM 0 comments
Labels: Linked Lists
Write a C program to return the nth node from the end of a linked list.
Posted by Admin at 1:30 PM 0 comments
Labels: Linked Lists
Write a C program to create a copy of a linked list.
Posted by Admin at 1:30 PM 0 comments
Labels: Linked Lists
Can we do a Binary search on a linked list?
Posted by Admin at 1:30 PM 0 comments
Labels: Linked Lists
How do you find the middle of a linked list?
Posted by Admin at 1:30 PM 0 comments
Labels: Linked Lists
Write a C program to implement a Generic Linked List.
Posted by Admin at 1:25 PM 0 comments
Labels: Linked Lists
How do you reverse a singly linked list? How do you reverse a doubly linked list?
Posted by Admin at 1:25 PM 0 comments
Labels: Linked Lists
How do you reverse a linked list without using any C pointers?
Posted by Admin at 1:25 PM 0 comments
Labels: Linked Lists
How can I search for data in a linked list?
Posted by Admin at 1:25 PM 0 comments
Labels: Linked Lists
How to compare two linked lists? Write a C program to compare two linked lists.
Posted by Admin at 1:24 PM 0 comments
Labels: Linked Lists
How to read a singly linked list backwards?
Posted by Admin at 1:24 PM 0 comments
Labels: Linked Lists
Write a C program to insert nodes into a linked list in a sorted fashion
Posted by Admin at 1:24 PM 0 comments
Labels: Linked Lists
Write a C program to free the nodes of a linked list
Posted by Admin at 1:14 PM 0 comments
Labels: Linked Lists
Given only a pointer to a node to be deleted in a singly linked list, how do you delete it?
Posted by Admin at 12:35 PM 1 comments
Labels: Linked Lists
Insert a node recursively in a Binary search tree
Posted by Admin at 10:48 AM 0 comments
Labels: Trees
How to declare array of pointer to a function returing pointer to an integer
Posted by Admin at 10:43 AM 0 comments
Labels: Arrays
How to declare a structure of a linked list
Posted by Admin at 10:41 AM 1 comments
Labels: Linked Lists
determine whether a machine's byte order is big-endian or little endian and convert from one to another
Posted by Admin at 10:06 AM 1 comments
Labels: Adhoc Programs
Write a C program to calculate pow(x,n)
Posted by Admin at 10:03 AM 1 comments
Labels: Adhoc Programs