C Interview Questions
Questions Answers Views Company eMail

There is a 100-story building and you are given two eggs. The eggs (and the building) have an interesting property that if you throw the egg from a floor number less than X, it will not break. And it will always brake if the floor number is equal or greater than X. Assuming that you can reuse the eggs which didn't broke; you got to find X in a minimal number of throws. Give an algorithm to find X in minimal number of throws.

Yahoo,

5 21396

Given an array of characters, how would you reverse it? How would you reverse it without using indexing in the array?

Microsoft,

1 8801

Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it?

3 6944

Concat two string with most overlapped substring has to remove  "abcd"+ "cdef" = "abcdef

6 8404

Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

HCL,

1725

what r the cpu registers r ther?

1 2917

printf("%d",(printf("Hello")); What it returns?

TCS,

32 55466

WRITE A PROGRAM TO FIND A REVERSE OF TWO NO

7 8900

what is diff between localstatic and globalstatis variable possible 2 use in another file...?

HCL,

2 4429

what is op? for(c=0;c=1000;c++) printf("%c",c);

Trigent,

21 23737

in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?

IBM,

11 30801

who is the founder of c

College School Exams Tests, HP,

19 28367

Who is invented by c?

Infosys, Mphasis,

24 26100

To what value do nonglobal variables default? 1) auto 2) register 3) static

4 8480

Would you rather wait for the results of a quicksort, a linear search, or a bubble sort on a 200000 element array? 1) Quicksort 2) Linear Search 3) Bubble Sort

3 5436


Post New C Questions

Un-Answered Questions { C }

What is the use of void pointer and null pointer in c language?

613


Can you pass an entire structure to functions?

682


What are pointers? What are stacks and queues?

568


Why c is known as a mother language?

627


Write a program to check armstrong number in c?

625






what is uses of .net

1258


What does volatile do?

554


What is difference between class and structure?

560


What are local static variables?

609


What is pivot in c?

558


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

646


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

740


Explain what are run-time errors?

597


Explain what is a static function?

624


What does the characters “r” and “w” mean when writing programs that will make use of files?

839