| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Write a program to generate prime factors of a given integer? | | 1 |
| why i join syntel? | Syntel | 11 |
| How to write a program for swapping two strings without
using 3rd variable and without using string functions. | iGate | 4 |
| sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2;
Find the value of x? | Subex | 1 |
| write a program to swap Two numbers without using temp variable. | HP | 16 |
| 11. Look at the Code:
#include<string.h>
void main()
{
char s1[]="abcd";
char s2[10];
char s3[]="efgh";
int i;
clrscr();
i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd"));
printf("%d",i);
}
What will be the output?
A)No output B) A Non Integer C)0 D) Garbage
| Accenture | 5 |
| What's wrong with "char *p; *p = malloc(10);"? | | 5 |
| what is difference between array and structure?
| TCS | 9 |
| int zap(int n)
{
if(n<=1)then zap=1;
else zap=zap(n-3)+zap(n-1);
}
then the call zap(6) gives the values of zap
[a] 8 [b] 9 [c] 6 [d] 12 [e] 15
| Wipro | 6 |
| 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 difference b/w compiler and debugger? | | 1 |
| who did come first hen or agg | Infosys | 8 |
| pgm to find middle element of linklist(in efficent manner) | Huawei | 1 |
| Difference between fopen() and open()? | Aricent | 1 |
| wats the diference btwen constant pointer and pointer to a
constant.pls give examples. | | 4 |
| what is the use of call back function in c?tell me with
example | | 1 |
| what is the diference between pointer to the function and
function to the pointer? | | 1 |
| 1,1,5,17,61,217,?,?. | | 3 |
| a=0;
b=(a=0)?2:3;
a) What will be the value of b? why
b) If in 1st stmt a=0 is replaced by -1, b=?
c) If in second stmt a=0 is replaced by -1, b=?
| Geometric-Software | 5 |
|
#include<stdio.h>
int SumElement(int *,int);
void main(void)
{
int x[10];
int i=10;
for(;i;)
{
i--;
*(x+i)=i;
}
printf("%d",SumElement(x,10));
}
int SumElement(int array[],int size)
{
int i=0;
float sum=0;
for(;i<size;i++)
sum+=array[i];
return sum;
}
output? | Ramco | 5 |
| |
| For more C Interview Questions Click Here |