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 21967

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

Microsoft,

1 9019

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 7272

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

6 8939

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,

1863

what r the cpu registers r ther?

1 3102

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

TCS,

32 58552

WRITE A PROGRAM TO FIND A REVERSE OF TWO NO

7 9652

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

HCL,

2 4702

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

Trigent,

21 25767

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

IBM,

11 31948

who is the founder of c

College School Exams Tests, HP,

19 29919

Who is invented by c?

Infosys, Mphasis,

24 28183

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

4 8874

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 5793


Post New C Questions

Un-Answered Questions { C }

How can I make it pause before closing the program output window?

717


how to make a scientific calculater ?

1701


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

806


which is conditional construct a) if statement b) switch statement c) while/for d) goto

886


What is meant by recursion?

742






What is else if ladder?

725


What is sizeof in c?

694


Explain modulus operator.

721


How can I get back to the interactive keyboard if stdin is redirected?

796


Why is struct padding needed?

748


what do you mean by inline function in C?

737


What is the difference between arrays and pointers?

759


Explain the use of fflush() function?

762


What is the use of getchar functions?

835


How can you tell whether a program was compiled using c versus c++?

732