| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| How does C++ help with the tradeoff of safety vs. usability?
| | 1 |
| where does malloc() function get the memory? | | 1 |
| WHAT IS MAXIMUM SIZE OF AN ARRAY IN C LANGUAGE? | IBM | 5 |
| 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. | | 2 |
| i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}
printf("%d", k);
| HCL | 6 |
| ABCDCBA
ABC CBA
AB BA
A A | | 1 |
| difference between function & structure | Verizon | 5 |
| wats the diference btwen constant pointer and pointer to a
constant.pls give examples. | | 6 |
| Reverse the part of the number which is present from
position i to j. Print the new number.
eg:
num=789876
i=2
j=5
778986 | | 1 |
| Is it possible to create recycle bin in mobiles? | | 2 |
| the factorial of non-negative integer n is written n! and
is defined as follows:
n!=n*(n-1)*(n-2)........1(for values of n greater than or
equal to 1 and
n!=1(for n=0)
Perform the following
1.write a c program that reads a non-negative integer and
computes and prints its factorial.
2. write a C program that estimates the value of the
mathematical constant e by using the formula:
e=1+1/!+1/2!+1/3!+....
3. write a c program the computes the value ex by using the
formula
ex=1+x/1!+xsquare/2!+xcube/3!+....
| Ignou | 2 |
| what is the difference between NULL & NUL keywords in C? | | 3 |
| Who had beaten up hooligan "CHAKULI" in his early college days? | | 1 |
| plz answer....A program that takes 3 variables e.g a,b,c in
as seperate parameters and rotates the values stored so
that value goes a to b, b to c and c to a . | | 3 |
| what is the use of getch() function in C program..
difference b/w getch() and getche()?? | Wipro | 12 |
| How would you write qsort? | | 1 |
| what will happen if you free a pointer twice after
allocating memory dynamically ? | Novell | 2 |
| What is an anonymous union and where to apply that ? | HP | 3 |
| what is the hexidecimal number of 4100? | Google | 14 |
| main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
} | NDS | 15 |
| |
| For more C Interview Questions Click Here |