Posted on :15-02-2016

Q1) Write a program to reverse a linked list and sort the same.

Q2) Given two integers A & B. Determine how many bits required to convert A to B. Write a function:

int BitSwapReqd(int A, int B);

Q3) Write an algorithm to insert a node into sorted linked list. After inserting, the list must be sorted.

Q4) Without using /, % and * operators. Write a function to divide a number by 3. itoa() function is available.

Q5) Write a program to swap two integer pointers.

Q6) Write a function int round (float x) to round off a floating point num to int.

Q7) Write an ALP to find sum of First n natural numbers using the following Instructions

LDA num ; load Accumulator with num DCR R ; decrement
Register R INR R ; increment Register R MOV x,y ; move the contents of register y into register x JZ label ; jump to label if A=0 DJNZ label; Decrement & Jump if A <> 0

You can use B & C registers in addition to A register?

Q8) Prove that a tree is BST. What is the height of a tree?

Q9) Given A, B & C Boolean polynomials. Prove That (A+BC) = (A+B) (A+C)

C Test:-

Q2) Find if a number is divisible my 3, without using %,/ or *. You can use atoi().

Q3) 2 integers A and B are given, find the no of bits that need to be flipped in A to get B. (X-OR a and b and count the number of bits)

Q4) Write a Rotate function for rotating elements in an array, using a reverse function.

Q5) Given 2 sorted arrays A and B with duplicate elements, get C= A -B and does not have duplicates (use a variation of merging 2 arrays and then remove the duplicates.)

Q6) Some routines to swap int pointers.

Q7) Subtraction of 2 base 13 numbers.

Q8) Min and max nodes of a quad tree.

Q9) Prove that in a tree, number of internal nodes is one less than leaves.

Q10) A couple of Boolean logic proofs

Q11) Code to see if a binary tree is a BST or not.

Q12) Switch case program output.

## Related Companies

HCL
TCS
Wipro
L & T Infotech
Godrej Infotech
SAP labs India
Mu-Sigma

FreshersLive - No.1 Job site in India. Here you can find latest 2020 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.

 ✖