| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| write a c program to check weather a particluar bit is set
or not? | IBM | 4 |
| what is the output of the following program?
main()
{
int i=-1,j=-1,k=0,l=2,m;
m=i++&&j++&&k++||l++;
printf("%d %d %d %d %d",i,j,k,l,m);
} | | 7 |
| 52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2? | | 5 |
| What is an anonymous union and where to apply that ? | HP | 3 |
| how memory store byte
| Huawei | 3 |
| When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it? | | 2 |
| Why the use of alloca() is discouraged?
| Oracle | 2 |
| How can we open a file in Binary mode and Text mode?what is
the difference? | PanTerra | 1 |
| what is the maximum limit of row and column of a matrix in c
programming. in linux . | | 1 |
| explain about storage of union elements. | Bosch | 2 |
| What are the different pointer models in c? | | 3 |
| Evaluate the following:
int fn(int v)
{
if(v==1 || v==0)
return 1;
if(v%2==0)
return fn(v/2)+2;
else
return fn(v-1)+3;
}
for fn(7);
1) 10
2) 11
3) 1
| | 6 |
| what is the use of pointers | | 5 |
| which of the following go out of the loopo if expn 2
becoming false
a.while(expn 1){...if(expn 2)continue;}
b.while(!expn 1){if(expn 2)continue;...}
c.do{..if(expn 1)continue;..}while(expn 2);
d.while(!expn 2){if(expn 1)continue;..}
| TCS | 2 |
| What will be the output of
x++ + ++x? | MBT | 13 |
| Write code for atoi(x) where x is hexadecimal string. | Adobe | 2 |
| Can u return two values using return keyword? If yes, how?
If no, why? | | 7 |
| why TCS selected more student in the software field from
all institution. | TCS | 3 |
| proc() {
static i=10;
printf("%d",i);
}
If this proc() is called second time, what is the output?
| Hughes | 5 |
| Define function ?Explain about arguments? | Geometric-Software | 2 |
| |
| For more C Interview Questions Click Here |