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 18210

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

Microsoft,

1 7601

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 5043




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

6 5914

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,

951

what r the cpu registers r ther?

1 1801

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

TCS,

32 36634

WRITE A PROGRAM TO FIND A REVERSE OF TWO NO

7 6347




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

HCL,

2 3059

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

Trigent,

21 14824

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

IBM,

11 23268

who is the founder of c

HP, College School Exams Tests,

19 19480

Who is invented by c?

Mphasis, Infosys,

24 14960

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

4 6309

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 3690


Post New C Questions






Un-Answered Questions { C }

I need previous papers of CSC.......plz help out by posting them.......

994


writ a program to compare using strcmp VIVA and viva with its output.

754


in linking some of os executables are linking name some of them

902


How to implement a packet in C

1628


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

799






What is pre-emptive data structure and explain it with example?

2479


find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }

1094


main() { static char *s[]={"black","white","yellow","voilet"}; char **ptr[]={s+3,s+2,s+1,s}, ***p; p=ptr; **++p; printf("%s",*--*++p+3); }

846


Why is it important to memset a variable, immediately after allocating memory to it ?

864


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

869


plz let me know how to become a telecom protocol tester. thank you.

1025


2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist

1822


Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

1534


how could explain about job profile

748


A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(

911