| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| which of the function operator cannot be over loaded
a) <=
b)?:
c)==
d)*
| HCL | 4 |
| what is the advantage of function pointer | TCS | 9 |
| 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 |
| n=7623
{
temp=n/10;
result=temp*10+ result;
n=n/10
}
| Wipro | 3 |
| what information does the header files contain? | BSNL | 4 |
| How to avoid structure padding in C? | Tech-Mahindra | 4 |
| what are the various memory handling mechanisms in C ? | HP | 2 |
| What is structure padding & expalain wid example
what is bit wise structure? | | 1 |
| who did come first hen or agg | Infosys | 8 |
| proc() {
static i=10;
printf("%d",i);
}
If this proc() is called second time, what is the output?
| Hughes | 5 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
Find the output | CitiGroup | 4 |
| What's the best way to declare and define global variables? | | 2 |
| Concat two string with most overlapped substring has to
remove "abcd"+ "cdef" = "abcdef | | 5 |
| Implement a function that returns the 5th element from the
end in a singly linked list of integers in one pass. | Microsoft | 2 |
| I have a function which accepts, and is supposed to
initialize,a pointer, but the pointer in the caller remains
unchanged. | | 1 |
| Would you rather wait for the results of a quicksort, a
linear search, or a bubble sort on a 200000 element array?
1) Quicksort
2) Linear Search
3) Bubble Sort
| | 2 |
| Which of the Following will define a type NODE that is a
node in a Linked list?
A)struct node {NODE*next;int x;};type def struct node NODE;
B)typedef struct NODE {struct NODE *next;int x;};
C)typedef struct NODE {NODE *next;int x;};
D)typedef struct {NODE *next;int x;}NODE;
| Accenture | 2 |
| Average of a couple 10 years ago was 25. The average
remains same after having a child and twins after 3 years.
What is the present age of the first child | IBM | 9 |
| biggest of two no's with out using if condition statement | | 2 |
| When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it? | | 2 |
| |
| For more C Interview Questions Click Here |