| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| value = 0xabcd;
for (loop = 1; (value >> 1) & 1 | loop & 1; loop++) {
foo();
if (loop & 1)
value >>= 1;
}
how many times is foo() executed? | Google | 5 |
| write a function for strtok()?? | Verifone | 1 |
| main()
{
int i=1;
while (i<=5)
{
printf("%d",i);
if (i>2)
goto here;
i++;
}
}
fun()
{
here:
printf("PP");
}
| ME | 3 |
| Write a program to accept a character & display its
corrosponding ASCII value & vice versa? | | 4 |
| 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 |
| Write a program to generate prime factors of a given integer? | | 3 |
| What are the preprocessors? | HP | 6 |
| Why doesn't the code "a[i] = i++;" work? | | 4 |
| main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how? | | 7 |
| if ENTERED FIVE DIGITS DESIGN A PROGRAM THAT WILL FIND
CORRESPONDING VALUE FROM ASCII TABLE | | 1 |
| What is the difference between typeof(foo) and myFoo.GetType()? | | 1 |
| a.One Cannot Take the address of a Bit Field
b.bit fields cannot be arrayed
c.Bit-Fields are machine Dependant
d.Bit-fields cannot be declared as static
Which of the Following Statements are true w.r.t Bit-Fields
A)a,b&c B)Only a & b C)Only c D)All
| Accenture | 2 |
| CopyBits(x,p,n,y)
copy n LSBs from y to x starting LSB at 'p'th position. | Adobe | 4 |
| how can i get output like this?
1
2 3
4 5 6 | Excel | 3 |
| Can u return two values using return keyword? If yes, how?
If no, why? | | 7 |
| consider the following C code
main()
{
int i=3,x;
while(i>0)
{
x=func(i);
i--;
}
int func(int n)
{
static sum=0;
sum=sum+n;
return(sum);
}
the final value of x is
| TCS | 3 |
| how many argument we can pas in in a function | CTS | 20 |
| code for copying two strings with out strcpy() function. | | 5 |
| what is volatile in c language? | TCS | 1 |
| how does printf function work | | 1 |
| |
| For more C Interview Questions Click Here |