C Interview Questions
- 0of 0 votes
Answeruse of arrays?
- khushboo taneja July 15, 2011| Report Duplicate | Flag | PURGE
IBM Developer Program Engineer C - 0of 0 votes
AnswersWhat is Enum?Why is the use of it?
- Rishi Sain July 15, 2011| Report Duplicate | Flag | PURGE
Brainware Software Engineer / Developer C - 0of 0 votes
AnswersIn 1st Phone screem:
- raped July 12, 2011
int main(){
int *p=0;
printf("%d",++p);
}
whats the output ?| Report Duplicate | Flag | PURGE
NetApp Software Engineer / Developer C - 0of 0 votes
Answerswhen i++ is better than ++i?
- Itcecsa July 10, 2011| Report Duplicate | Flag | PURGE
Baidu Software Engineer / Developer C - 0of 0 votes
Answershow to allocate memory for string of unknown/arbitrary length during execution?
- vasu July 04, 2011
.
.
modify the following code & resultant code should allocate of any given input of arbitrary length
char* getstring(){
char* s;
gets(s);
return s;
}| Report Duplicate | Flag | PURGE
Developer Program Engineer C - 0of 0 votes
AnswerHow to know the stack size in C?? I am using Windows 32 bit and VC++ compiler...
- Alex June 27, 2011| Report Duplicate | Flag | PURGE
Motorola Software Engineer / Developer C - 0of 0 votes
Answersprint the nodes of binary tree in on sorted oder
- sreebabu June 20, 2011| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer C - 0of 0 votes
Answersreversing of double linked list
- sreebabu June 20, 2011| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer C - 0of 0 votes
Answerswrite a function which allocates two dimensional array dynamically
- truekool2 June 15, 2011
int ** allocate(int row, int col)| Report Duplicate | Flag | PURGE
Adobe Computer Scientist C - 0of 0 votes
Answersgiven power(x,y)implementation, find number of multiplications in power(5,12)( written test)
- truekool2 June 15, 2011
int pow(int x, int n)
{
if(n==0)return(1);
else if(n%2==0)
{
return(pow(x,n/2)*pow(x,(n/2)));
}
else
{
return(x*pow(x,n/2)*pow(x,(n/2)));
}
}| Report Duplicate | Flag | PURGE
Adobe Computer Scientist C - 0of 0 votes
Answersmalloc(0)
- munukutlapraveen April 23, 2011| Report Duplicate | Flag | PURGE
Samsung Software Engineer / Developer C - 0of 0 votes
AnswersWrite test cases for
- Anonymous April 21, 2011
int divide(int a, int b)
you have to use subtract to get the result!| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C - 0of 0 votes
Answersexample of volatile usage.
- Abhi April 15, 2011| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer C - 0of 0 votes
Answersimplement c subtring function. write the code, along with error checks and some basic testing
- Abhi April 15, 2011| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer C - 0of 0 votes
AnswersHow will you do inheritance in C without using any C++ constructs?
- A M April 12, 2011| Report Duplicate | Flag | PURGE
A9 Software Engineer / Developer C C++ - 0of 0 votes
AnswersGiven the following:
void foo (/* Add param here */) { } void main () { char *str; foo (/* Pass str somehow here */); printf ("%s\n", str); }
Complete foo.
- souravghosh.btbg March 27, 2011
Follow up question was:
You probably used malloc or new in foo. That will cause memory leak. Write it in such a way so that memory does not leak (Basically use global or static).
Eazy peazy!| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C - 0of 0 votes
AnswersDFS of a m-arry in non-recursive manner without using extra memory.
- abcTemp March 18, 2011| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer C - 0of 0 votes
Answersvoid main()
- vimal March 17, 2011
{
int i=0;
int array[5];
for(i=0;i<=5;i++)
array[i]=0;
printf("why this printf not working?");
}| Report Duplicate | Flag | PURGE
Nexabion Developer Program Engineer C - 0of 0 votes
Answerswrite a code to find the endianness of the system
- rakesh March 15, 2011| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer C - -1of 1 vote
AnswersWrite code for page fault handler in Linux ( I have a project on this so may be I was asked)
- NVIDIA reject March 15, 2011| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer C Linux Kernel - 0of 0 votes
AnswersHow would you turn a matrix (2D) by 180 degree...
- NVIDIA reject March 15, 2011
1 2 3
4 5 6 would be turning by 90 degrees if we do it as
1 4
2 5
3 6
we have to turn it 180 degrees - another 90 degrees ( I did not understand this question properly)| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer C - 0of 0 votes
AnswersSay there is an operation like a=b; Its the statement for which you want to avoid concurrency. (Say SMP or preemption or what ever)
- NVIDIA reject March 15, 2011
With out using locks(spin,semaphore,mutex etc. etc.) how would you make this statement protected?
Ans: atomic operations (atomic assign etc.)| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer C Linux Kernel - 1of 1 vote
AnswersHow would you debug kernel code.
- NVIDIA reject March 15, 2011| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer C Debugging Linux Kernel - 0of 0 votes
AnswersHow would you do benchmarking (compare the performance) in a device driver code? Apart from timing or time is there any other standard way? He basically meant comparing Programmed I/O and DMA. (Leave security etc. only performance comparison)
- NVIDIA reject March 15, 2011| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer C Linux Kernel