| Other C Code Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| #ifdef something
int some=0;
#endif
main()
{
int thing = 0;
printf("%d %d\n", some ,thing);
} | | 1 |
| #include<stdio.h>
main()
{
struct xx
{
int x=3;
char name[]="hello";
};
struct xx *s;
printf("%d",s->x);
printf("%s",s->name);
} | | 1 |
| Is this code legal?
int *ptr;
ptr = (int *) 0x400; | | 1 |
| #include <stdio.h>
#define a 10
main()
{
#define a 50
printf("%d",a);
} | | 1 |
| Declare an array of N pointers to functions returning
pointers to functions returning pointers to characters? | | 1 |
| func(a,b)
int a,b;
{
return( a= (a==b) );
}
main()
{
int process(),func();
printf("The value of process is %d !\n
",process(func,3,6));
}
process(pf,val1,val2)
int (*pf) ();
int val1,val2;
{
return((*pf) (val1,val2));
} | | 1 |
| main()
{
int i=_l_abc(10);
printf("%d\n",--i);
}
int _l_abc(int i)
{
return(i++);
} | | 1 |
| Is the following code legal?
struct a
{
int x;
struct a b;
} | | 1 |
| main()
{
int i=10;
i=!i>14;
Printf ("i=%d",i);
} | | 1 |
| int swap(int *a,int *b)
{
*a=*a+*b;*b=*a-*b;*a=*a-*b;
}
main()
{
int x=10,y=20;
swap(&x,&y);
printf("x= %d y = %d\n",x,y);
} | | 1 |
| Write a function to find the depth of a binary tree. | Adobe | 8 |
| programming in c lanugaue programm will errror error with
two header file one as stdio.h and other one is conio.h | | 1 |
| 1
o 1
1 0 1
0 1 0 1
1 0 1 0 1
how to design this function format in c-language ? | | 1 |
| char *someFun()
{
char *temp = “string constant";
return temp;
}
int main()
{
puts(someFun());
} | | 1 |
| main()
{
int i=0;
while(+(+i--)!=0)
i-=i++;
printf("%d",i);
} | | 1 |
| void main()
{
int k=ret(sizeof(float));
printf("\n here value is %d",++k);
}
int ret(int ret)
{
ret += 2.5;
return(ret);
} | | 1 |
| What is the problem with the following code segment?
while ((fgets(receiving array,50,file_ptr)) != EOF)
; | | 1 |
| Write a C function to search a number in the given list of
numbers. donot use printf and scanf | Honeywell | 4 |
| write a program in c to merge two array | | 1 |
| Is there any difference between the two declarations,
1. int foo(int *arr[]) and
2. int foo(int *arr[2]) | | 1 |
| |
| For more C Code Interview Questions Click Here |