Image representing Microsoft as depicted in Cr...Image via CrunchBase

1)reverse the given n-bit unsigned integer?
I mean if 1011 is the i/p then o/p=1101
Time copmlexity should be as small as possible...

2)Given 10 points, arrange those 10 points such that they make five straight lines and each straight line should
have 4-points

3) write Open Hashing code with doubly linked list

4)write linked list reversal program

5)Given an Array of integers as the input asked me to find out smallest subset of the array such that the sum of the all the elements
of that subset array should be maximum...in all the subsets...

6)To Give design aspects of writting a software for a car which will be driven by the blind people.

7)Given a character array which has one word asked me to reverse that word.

8)Given a character array which has "x" no of words, asked me to reverse them

9)A Desert has 1000KM legnth, A Camel and 3000 bananas are there at one end
problem is you have to get as many bananas as possible to the other end
by that camel.
camel constraints...
i) It will eat 1 banana for each kilometer even if it is not carrying any bananas(i.e it needs on banana
for just to walk 1km)
ii) It cannot carry more than 1000 bananas.

10) Given a two dimensional array of size mxn, Problem is to take each and every cell, as there are 8 directions to travel from that cell one right, two left, three up, four down, other four are through
four diagnols. except at the boundaries(<> print all ths words.
write all the different test cases for the above....

11) One function which was written by somebody else? that function spec
says the following.

takes a two dimensional array as the input which has "N" no of words
and "M" no of non-words...
that function returns the no of words.

given two cases of inputs...
1) array has 32words and 32 non words]
2) array has 30 wrods and 34 non words
out of these two which case is better and why?

12) Given the Robo which has PC interface via the following 3 functions

1) bool is_ther_any_step(bool);
sees any step above if the argument is true and returns true
if step exists above ti it.
sees any step below to it if the argument is false and returns
appropriately..

2) goto_next_step(bool )
Goes to next upper step if the argument is true
if the argument is true and no above step then robo gets damaged

Goes to down step if the argument is false...

3) Clean_floor()...
cleans that step by pouring water,cleaning and drying..

write the program to clean a stair case in any building...
Reblog this post [with Zemanta]

The C programming language was developed at Be...Image via Wikipedia

1.(i) in c there is no oop concept but in c++ have oop concept
(ii) In C program divide into number of sub-parts called function.but in C++ program divide into number of sub-parts called methods

2. Yes we can pass arguments to main

3.Even though static and constant variable are common for all a objects the value of static variable can be increased in time being but it cannot be increased in constant variable

4. void main()
{ if(printf("Hello world")){}}

5.The answer is 44..
As the space is an empty character and one the compiler counts one more character for the Null character constant '/0' And the space that Null takes in memory is 4 bytes same as int but this value depends on the Compiler that you use

6.2 bytes of memory because the pointer variable, whatever data type it maybe pointing to is always an unsigned integer as the address is always a positive integer, hence requiring 2 bytes of memory

7.option c is wrong i.e. a1->p1. Because a1 is not a pointer you can not refer its member through -> operator

8.The major difference between methods and functions is that methods called by the reference variables called objects where as the functions do not having any reference variables.

9.We can list as:

i. In classes the default scope is private whereas in structures u have public.equir

ii.Also u can define the scope according to is requirements in classes.

iii. In classes u can create functions and methods which is not so in the case of structures.

iv.You can also do operator overloading in case of classes which is not so in d case of structures.

v.Various other object - oriented features are found in classes and not in structures wherin u can create objects which is not possible in structures.

10.if both the base class and derived class can have the constructors,if the derived class is to call the constructor of its own using its object,it can.but when it calls its destructor,the compiler calls the destructor of base class.thats why the virtual destructor concept is coined. but there are no virtual constructors
Reblog this post [with Zemanta]
1.Tell one difference which is in C and not in C++.

2.Can we pass arguments in main()

3. Difference between static and constant variable

4.Write "hello world program" without using any semicolon in C

5.What is the output of following program
#include stdio.h
void main()
{
printf("%d%d",sizeof(NULL),sizeof(" "));
}
6.If we declare a pointer like char *p;how much memory is allocated for pointer variable p.

7.Struct out {struct in{ char c;int d;}s1,*p1;}a1, *pa1;pa1 = &a1;a1.p1 = &s1;Which is incorrect?
a). a1.p1->c b). pa1->p1->c c). a1->p1 d). a1.s1.c

8.What is the difference between methods and functions

9.Difference between class and structure

10.Explain the need for "Virtual Destructor".

11.What is the difference between "C structure" and "C++ structure".

12. Diffrence between a "assignment operator" and a "copy constructor"

13. What is the difference between "overloading" and "overridding"?

14. Explain the need for "Virtual Destructor".

15. Can we have "Virtual Constructors"?

16. What are the different types of polymorphism?

17. What are Virtual Functions? How to implement virtual functions in "C"

18. What are the different types of Storage classes?

19. What is Namespace?

20. What are the types of STL containers?.

21. Difference between "vector" and "array"?

22. How to write a program such that it will delete itself after exectution?

23. Can we generate a C++ source code from the binary file?

24. What are inline functions?

25. What is "strstream" ?

26. Explain "passing by value", "passing by pointer" and "passing by reference"

27. Have you heard of "mutable" keyword?

28. What is a "RTTI"?

29. Is there something that I can do in C and not in C++?

30. What is the difference between "calloc" and "malloc"?

31. What will happen if I allocate memory using "new" and free it using "free" or allocate using "calloc" and free it using "delete"?

32. Difference between "printf" and "sprintf".

33. What is "map" in STL?

34. When shall I use Multiple Inheritance?

35. Explain working of printf.

36. Talk sometiming about profiling?

37. How many lines of code you have written for a single program?

38. How to write Multithreaded applications using C++?

39. Write any small program that will compile in "C" but not in "C++"

40. What is Memory Alignment?

41. Why preincrement operator is faster than postincrement?

42. What are the techniques you use for debugging?

43. How to reduce a final size of executable?

44. Give 2 examples of a code optimization.

Reblog this post [with Zemanta]
1.The size of the bucket is N kb. The bucket fills at the rate of 0.1 kb per millisecond. A programmer sends a program to receiver. There it waits for 10 milliseconds. And response will be back to programmer in 20 milliseconds. How much time the program takes to get a response back to the programmer, after it is sent?

2.A man,a women and a child can do a piece of work in 6 days,man can do it in 14 days,women can do it 16 days,and in how many days child can do the same work?

3.In the 20th century there is a year, which does not change if viewed upside down. Which is the year?

4. Obtain 20 using two threes. (You can use any mathematical sign or operation)

5.A file is transferred from one location to another in ,buckets,. The size of the bucket is 10 kilobytes. The bucket gets filled at the rate of 0.0001 kilobytes per millisecond. The transmission time from sender to receiver is 10 milliseconds per bucket. After the receipt of the bucket the receiver sends an acknowledgement that reaches sender in 100 milliseconds. Assuming no error during transmission, write a formula to calculate the time taken in seconds to successfully complete the transfer of a file of size N kilobytes.

6.A dishonest dealer professes to sell his goods at cost price. But he uses a false weight and thus gains 300/47% for a kg, he uses a weight of
a)940gms b)947gms c)953gms d)960gms

7.A, B and C start at the same direction to run around a circular stadium. A completes a round in 252 sec, B in 308 sec and C in 198 sec, all starting at the same point. After what time will they meet again ?

8.Jalia is twice older than qurban. If jalia was 4 years younger, Qurban was 3 years older their difference between their ages is 12 years. What is the sum of their ages?
a)67 b)57 c)36 d)none

9.A sporting goods store ordered an equal number of white and yellow balls.The tennis ball company delivered 45 extra white balls,making the ratio of white balls to yellow balls 1/5 :1/6how many white balls

10.In 80 coins 1 coin is counterfeit which is minimum no. of weighings to find out counterfeit coin.
Reblog this post [with Zemanta]

Mahesh Ramachandran at TCSImage by markhillary via Flickr

1. What are the different types of joins?
2. Explain normalization with examples.
3. What cursor type do you use to retrieve multiple
record sets?
4. Difference between a "where" clause and a "having"
clause
5. What is the difference between "procedure" and
"function"?
6. How will you copy the structure of a table without
copying the data?
7. How to find out the database name from SQL*PLUS
command prompt?
8. Tradeoffs with having indexes
9. Talk about "Exception Handling" in PL/SQL?
10. What is the difference between "NULL in C" and
"NULL in Oracle?"
11. What is Pro*C? What is OCI?
12. Give some examples of Analytical functions.
13. What is the difference between "translate" and
"replace"?
14. What is DYNAMIC SQL method 4?
15. How to remove duplicate records from a table?
16. What is the use of Analyzing the tables?
17. How to run SQL script from a Unix Shell?
18. What is a "transaction"? Why are they necessary?
19. Explain Normalization dn De normalization with
examples.
20. When do you get constraint violation? What are the
types of constraints?
21. How to convert RAW data type into TEXT?
22. Difference - Primary Key and Aggregate Key
23. How functional dependency is related to database
table design?
24. What is a "trigger"?
25. Why can a "group by" or "order by" clause be
expensive to process?
26. What are "HINTS"? What is "index covering" of a
query?
27. What is a VIEW? How to get script for a view?
28. What are the Large object types supported by
Oracle?
29. What is SQL*Loader?
30. Difference between "VARCHAR" and "VARCHAR2"
data types.
31. What is the difference among "dropping a table",
"truncating a table" and "deleting all records" from a
table.
32. Difference between "ORACLE" and "MICROSOFT ACCESS"
databases.
33. How to create a database link ?
Reblog this post [with Zemanta]