| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| if a five digit number is input through the keyboard, write
a program to calculate the sum of its digits.
(hint:-use the modulus operator.'%') | | 5 |
| Blade logic interview question.
1st round is a written tests with 15 multiple questions
from c and c++. All are simple basic question.
Like int main ()
{
Int i=65;
Return printf(“%c”, i);
}
2nd and 3rd round is technical interview.
The position for which I was interview was core UNIX and c.
Yes it is for system programming.
The company has product name blade server. For their server
they are creating their own command for their purpose.
Example cd command.
We can implement it in a c program by using the chdir()
function.
So the question asks related to PID, fork, pipe, shared
memory, signal.
Write a program in c which will act as cp command.
| BladeLogic | 1 |
| What is function pointer and where we will use it | NetApp | 1 |
| Function to find the given number is a power of 2 or not? | Motorola | 9 |
| what does the following function print?
func(int i)
{
if(i%2)return 0;
eale return 1;
}
main()
{
int =3;
i=func(i);
i=func(i);
printf("%d",i);}
| TCS | 8 |
| What kind of sorting is this?
SORT (k,n)
1.[Loop on I Index]
repeat thru step2 for i=1,2,........n-1
2.[For each pass,get small value]
min=i;
repeat for j=i+1 to N do
{
if K[j]<k[min]
min=j;
}
temp=K[i];K[i]=K[min];K[min]=temp;
3.[Sorted Values will be returned]
A)Bubble Sort
B)Quick Sort
C)Selection Sort
D)Merge Sort | Accenture | 3 |
| main()
{
int i=400,j=300;
printf("%d..%d");
}
| ME | 7 |
| the operator for exponencation is
a.**
b.^
c.%
d.not available
| TCS | 4 |
| Evaluate the following:
int fn(int v)
{
if(v==1 || v==0)
return 1;
if(v%2==0)
return fn(v/2)+2;
else
return fn(v-1)+3;
}
for fn(7);
1) 10
2) 11
3) 1
| | 6 |
| f(x,y,z)
{
y = y+1;
z = z+x;
}
main()
{
int a,b;
a = 2
b = 2;
f(a+b,a,a);
print a;
}
what is the value of 'a' printed | | 4 |
| how to find the binary of a number? | Infosys | 5 |
| 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 |
| what is the hexidecimal number of 4100? | Google | 13 |
| What are the commands should be given before weiting C
Program i.e, Cd.. like | Infonet | 2 |
| can i know the source code for reversing a linked list with
out using a temporary variable?
| Honeywell | 3 |
| who is the founder of c | HP | 7 |
| Program to write some contents into a file using file
operations with proper error messages. | | 1 |
| why TCS selected more student in the software field from
all institution. | TCS | 3 |
| write a program to display the array elements in reverse
order in c language | | 2 |
| what is memory leak?
| | 3 |
| |
| For more C Interview Questions Click Here |