| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Tell about strtok & strstr functions | Motorola | 2 |
| What is meant by
int fun const(int a, int b) {
....
...
}
| | 1 |
| how to find a 5th bit is set in c program | IBM | 3 |
| wat is the difference between a definition and declaration?
float y;---it looks like a declaration..but it s a
definition.how?someone explain | | 3 |
| how does the for loop work actually..suppose for the
following program how it ll work plz explain to me
for(i=5;i>=0;i--)
prinf(i--); | RMSI | 16 |
| Why doesn't the code "a[i] = i++;" work? | | 4 |
| #include<stdio.h>
int fun();
int i;
int main()
{
while(i)
{
fun();
main();
}
printf("hello \n");
return 0;
}
int fun()
{
printf("hi");
}
answer is hello.how??wat is tat while(i) mean? | Intel | 4 |
| void main()
{
int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} };
int (*p)[2];
int i,j,*pint;
for(i=0;i<=3;i++)
{
p=&s[i];
pint=p;
printf("\n");
for(j=0;j<=1;j++)
printf("%d",*(pint+j));
}
} while running this program it shows a warning-suspicious
pointer conversion ie pint=p; my que is why should we assign
the value of p to pint again.why cant we use it directly as
*(p+j)..but if i use like tat the o/p is garbage value.. | | 1 |
| Which is not valid in C?
1) class aClass{public:int x;}
2) /* A comment */
3) char x=12;
| | 5 |
| what is the definition of storage classes? | Wipro | 2 |
| 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 |
| What is the difference between constant pointer and pointer
to a constant. Give examples. | TCS | 4 |
| whether itis a structured language? | Microsoft | 1 |
| what is the difference between structural,object
based,object orientd programming languages? | PanTerra | 1 |
| for(i=0;i=printf("Hello");i++);
printf("Hello");
how many times how will be printed????????? | | 4 |
| which types of data structure will i use to convert infix to
post fix??? | IIT | 3 |
| what is mallloc()?how it works? | Excel | 3 |
| what is the difference between getch() and getchar()? | | 5 |
| main()
{
int a = 65;
printf(“%d %o %x”,a,a,a);
}
Output
65 101 41
Please explain me.How it is coming like that?
| Excel | 2 |
| #define d 10+10
main()
{
printf("%d",d*d);
} | | 3 |
| |
| For more C Interview Questions Click Here |