| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Determine if a number is a power of 2 at O(1). | | 1 |
| How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance | | 7 |
| how to find out the union of two character arrays? | | 1 |
| we have to use realloc only after malloc or calloc ? or we
can use initially with out depending on whether we are
using malloc or calloc in our program ? | | 1 |
| what is the stackpointer | | 2 |
| what type of language is C? | Microsoft | 2 |
| #define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d\n",x,y);
swap2(x,y);
printf("%d %d\n",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}
what are the outputs? | Ramco | 4 |
| Total of how many functions are available in c? | | 2 |
| write a own function for strstr | LG-Soft | 1 |
| How would you write qsort? | | 1 |
| will u give me old quesrion papers for aptitude for L & t
info tech? | L&T | 1 |
| how to exchnage bits in a byte
b7<-->b0 b6<-->b1 b5<-->b2 b4<-->b3
please mail me the code if any one know to
rajeshmb4u@gmail.com | Honeywell | 3 |
| different between overloading and overriding | | 3 |
| 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 |
| C program code
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 | 4 |
| write a program to compare 2 numbers without using logical
operators? | IBM | 1 |
| who will call your main function in c under linux? | | 2 |
| why you will give me a job in TCS. | TCS | 5 |
| what is the output for the code :
main()
{
int i,j;
printf("%d %d ",scanf("%d%d",&i,&j));
} | Infosys | 15 |
| 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
| | 2 |
| |
| For more C Interview Questions Click Here |