| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What are the phases in s/w developed life cycle?
wat is the diff b/w stack & queue...where do we use stack | | 5 |
| what is the benefit of c30 | | 1 |
| different between overloading and overriding | | 3 |
| what's the o/p
int main(int n, char *argv[])
{
char *s= *++argv;
puts(s);
exit(0);
}
| Motorola | 1 |
| A function 'q' that accepts a pointer to a character as
argument and returns a pointer to an array of integer can
be declared as:
A)int (*q(char*)) []
B)int *q(char*) []
C)int(*q)(char*) []
D)None of the Above
| Accenture | 2 |
| Identify the correct argument for the function call fflush
() in ANSI C:
A)stdout
B)stdin
C)stderr
D)All the above
| Accenture | 2 |
| Function to find the given number is a power of 2 or not? | Motorola | 9 |
| write a program to display the array elements in reverse
order in c language | | 2 |
| #include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
| ME | 4 |
| #define MAX(x,y) (x) > (y) ? (x) : (y)
main()
{
int i = 10, j = 5, k = 0;
k = MAX(i++, ++j);
printf("%d %d %d", i,j,k);
}
what will the values of i , j and k?
}
| NDS | 9 |
| Determine the code below, tell me exactly how many times is
the operation sum++ performed ?
for ( i = 0; i < 100; i++ )
for ( j = 100; j > 100 - i; j--)
sum++; | ITCO | 3 |
| write the program for prime numbers? | TCS | 7 |
| What are the preprocessors? | HP | 3 |
| compute the nth mumber in the fibonacci sequence? | TCS | 6 |
| how to do in place reversal of a linked list(singly or
doubly)? | | 1 |
| What will be printed as the result of the operation below:
#include<..>
int x;
int modifyvalue()
{
return(x+=10);
}
int changevalue(int x)
{
return(x+=1);
}
void main()
{
int x=10;
x++;
changevalue(x);
x++;
modifyvalue();
printf("First output:%d\n",x);
x++;
changevalue(x);
printf("Second output:%d\n",x);
modifyvalue();
printf("Third output:%d\n",x);
} | | 2 |
| identify the in correct expression
a.a=b=3=4;
b.a=b=c=d=0;
float a=int b=3.5;
d.int a;
float b;
a=b=3.5;
| TCS | 4 |
| What is function pointer and where we will use it | NetApp | 1 |
| x=2,y=6,z=6
x=y==z;
printf(%d",x)
| HCL | 7 |
| Can we write a program without main() function? | | 6 |
| |
| For more C Interview Questions Click Here |