| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the advantage of using SEMAPHORES to ORDINARY
VARIABLES??? | NSN | 1 |
| What character terminates all strings composed of character
arrays?
1) 0
2) .
3) END
| | 3 |
| write a function which accept two numbers from main() and
interchange them using pointers? | | 3 |
| Reverse the part of the number which is present from
position i to j. Print the new number.[without using the array]
eg:
num=789876
i=2
j=5
778986 | | 2 |
| CopyBits(x,p,n,y)
copy n LSBs from y to x starting LSB at 'p'th position. | Adobe | 4 |
| Why data types in all programming languages have some range?
Why ritche have disigned first time likethat?Why not a
single data type can support all other types? | Excel | 1 |
| What are the commands should be given before weiting C
Program i.e, Cd.. like | Infonet | 3 |
| which type of question asked from c / c++ in interview. | | 2 |
| What is structure padding ? | HP | 2 |
|
main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}
output?? | Ramco | 13 |
| Add 2 64 bit numbers on a 32 bit machine | NetApp | 3 |
| which one low Priority in c?
a)=,b)++,c)==,d)+ | | 8 |
| Which of the following is not an infinite loop ?
a.while(1){
....
}
b.for(;;){
...
}
c.x=0;
do{
/*x unaltered within theloop*/
...
}while(x==0);
d.# define TRUE 0
...
while(TRUE){
....
}
| TCS | 4 |
| logic for generating all the combinations of the any number
of given letters.
ex:::::::::
if a,b,c,d are given the o/p should be
abcd,dcba,dbac,bcad,................
4*3*2*1 combinations............ | Infosys | 2 |
| totally how much header files r in c language | TCS | 4 |
| If "AaBbCc" is passed to the char
char x(*a)
{
a[0]?x(a+1):1;
printf("%c",a[0]);
return 1;
}
what will be the output?
| Hughes | 5 |
| Result of the following program is
main()
{
int i=0;
for(i=0;i<20;i++)
{
switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);
}
}
a)0,5,9,13,17
b)5,9,13,17
c)12,17,22
d)16,21
e)syntax error
| IBM | 4 |
| 4.weight conversion:
Write a program that will read weight in pounds and convert
it into grams.print both the original weight and the
converted value.There are 454 grams in a pound.design and
carry out a test plan for this program.
| Wipro | 1 |
| #ifdef TRUE
int I=0;
#endif
main()
{
int j=0;
printf("%d %d\n",i,j);
}
| ADITI | 2 |
| How does free() know how many bytes to free? | | 5 |
| |
| For more C Interview Questions Click Here |