| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| printf("%d",(printf("Hello")); What it returns?
| TCS | 23 |
| WRITE A C PROGRAM TO FIND SECOND BIGGEST VALUE FROM THE
GIVEN VALUES | | 1 |
| How the C program can be compiled? | HP | 7 |
| Write a program to compare two strings without using the
strcmp() function | Accenture | 14 |
| write a program to swap bits in a character and return the value
prototype of function
char fun (char a, charb flag c)
where fun returns a char, char a is a the value char b is
the bit to be changed and flag c is the bit value
for eg: x=fun(45,7,0)
since 45 is 0010 0101
and ow x should contain the value 65 (0110 0101) | Bosch | 1 |
| Determine if a number is a power of 2 at O(1). | | 1 |
| WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?
| | 6 |
| Which command is more efficient?
*(ptr+1) or ptr[1] | | 3 |
| 2.main
{
int x,j,k;
j=k=6;x=2;
x=j*k;
printf("%d", x);
| HCL | 6 |
| What is function pointer and where we will use it | NetApp | 1 |
| what is the advantage of function pointer | TCS | 10 |
| f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
| Hughes | 4 |
| main()
{int a=200*200/100;
printf("%d",a);
} | TCS | 7 |
| What's a "sequence point"? | | 2 |
| int a=2,b=3,c=4;
printf("a=%d,b=%d\n",a,b,c);
what is the o/p? | Verifone | 6 |
| writw a program to insert an element in the begning of a
doubly linked list | | 1 |
| plz answer..... a program that reads non-negative integer
and computes and prints its factorial | | 2 |
| When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it? | | 2 |
| In the following control structure which is faster?
1.Switch
2.If-else
and which consumes more memory? | | 4 |
| how to find out the union of two character arrays? | | 1 |
| |
| For more C Interview Questions Click Here |