| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| how does the C compiler interpret the following two statements
p=p+x;
q=q+y;
a.p=p+x;
q=q+y
b.p=p+xq=q+y
c.p=p+xq;
q=q+y
d.p=p+x/q=q+y
| TCS | 3 |
| pgm in c to reverse string by word using array(god is love
becomes love is god)
(no additional array can used,space is only delimiter
between words ) | Persistent | 1 |
| How does free() know how many bytes to free? | | 5 |
| the operator for exponencation is
a.**
b.^
c.%
d.not available
| TCS | 4 |
| How to use c/c++ code in JAVA | Satyam | 7 |
| write a “Hello World” program in “c” without using a semicolon? | | 3 |
| the code is::::: if(condition)
printf("hello");
else
printf("world");
WHAT WILL BE THE CONDITION IN IF IN SUCH A WAY THAT BOTH
HELLO AND WORLD ARE PRINTED IN A SINGLE ATTEMPT?????? SINGLE
ATTEMPT IN THE SENSE... IT MUST FIRST PRINT "HELLO" AND IT
MUST GO TO ELSE PART AND PRINT "WORLD"..... NO LOOPS,
RECURSION ARE ALLOWED........................ | IBM | 9 |
| parkside's triangle..
create a program like this..
enter the size: 6
enter the seed: 1
output:
1
23
456
7891
23456
789123
sample2:
enter the size: 5
enter the seed: 3
output:
3
45
678
9123
45678
parkside should not exceed 10 while its seed should only be
not more than 9.. | | 4 |
| Can we access RAM?
How? Whats the range of access?
Similarly What are other hardware we can access? | | 1 |
| what is the different between if-else and switch statment
(other than syntax) | CTS | 9 |
| 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 |
| what is the value of 'i'?
i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")
| Cadence | 4 |
| WHAT IS MAXIMUM SIZE OF AN ARRAY IN C LANGUAGE? | IBM | 5 |
| explain about storage of union elements. | Bosch | 2 |
| how many keywords do C compile? | Microsoft | 2 |
| What is meant by
int fun const(int a, int b) {
....
...
}
| | 1 |
| Write a program to exchange two variaables without temp | Geometric-Software | 6 |
| write an algorithm which can find the largest number among
the given list using binary search ...............
this was asked in the interview | Satyam | 2 |
| Look at the Code:
main()
{
int a[]={1,2,3},i;
for(i=0;i<3;i++)
{
printf("%d",*a);
a++;
}
}
Which Statement is/are True w.r.t the above code?
I.Executes Successfully & Prints the contents of the array
II.Gives the Error:Lvalue Required
III.The address of the array should not be changed
IV.None of the Above.
A)Only I B)Only II C)II & III D)IV
| Accenture | 3 |
| can anyone please tell me wat is backlogs... i was looking
for the job openings where i read this.. eligibility
criteria minimum 70% in degree without backlogs. is that
arrear.. if so is it standing arrear or history of
arrears... please help me... | | 4 |
| |
| For more C Interview Questions Click Here |