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 17947

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

Microsoft,

1 7461

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 4887




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

6 5757

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,

872

what r the cpu registers r ther?

1 1675

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

TCS,

32 34717

WRITE A PROGRAM TO FIND A REVERSE OF TWO NO

7 6191




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

HCL,

2 2958

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

Trigent,

21 14231

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

IBM,

11 22639

who is the founder of c

HP, College School Exams Tests,

19 19067

Who is invented by c?

Mphasis, Infosys,

24 14433

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

4 6185

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 3582


Post New C Questions






Un-Answered Questions { C }

what is the diffrenet bettwen HTTP and internet protocol

640


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

653


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

2409


C language questions for civil engineering

324


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include #include #include #include int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

829






What is the code for 3 questions and answer check in VisualBasic.Net?

938


what will be the output for the following main() { printf("hi" "hello"); }

5128


I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.

1106


write a program to display all prime numbers

697


how is the examination pattern?

832


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

1429


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

1030


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

1058


what is the different bitween abap and abap-hr?

935


which is an algorithm for sorting in a growing Lexicographic order

606