| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the differnce between AF_INET and PF_INET? | Wipro | 1 |
| why i join syntel? | Syntel | 11 |
| difference between i++* and *++i | IBM | 2 |
| program to get the remainder and quotant of given two
numbers with out using % and / operators? | IBM | 4 |
| If we have an array of Interger values, find out a sub array
which has a maximum value of the array and start and end
positions of the array..The sub array must be contiguious.
Take the start add to be 4000.
For Ex if we have an array arr[] =
{-1,-2,-5,9,4,3,-6,8,7,6,5,-3}
here the sub array of max would be
{8,7,6,5} coz the sum of max contiguous array is 8+7+6+5 =
26.The start and end position is 4014(8) and 4020(5). | Microsoft | 3 |
| f()
{
int a=2;
f1(a++);
}
f1(int c)
{
printf("%d", c);
}
c=?
| Geometric-Software | 2 |
| what is compiler | | 5 |
| Result of the following program is
main()
{
int i=0;
for(i=0;i<20;i++)
{
switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);
}
}
a)0,5,9,13,17
b)5,9,13,17
c)12,17,22
d)16,21
e)syntax error
| IBM | 3 |
| Write a programme to find even numbers without using any
conditional statement? | Infosys | 3 |
| disadvantages of realloc ? | HCL | 1 |
| write a program to print sum of each row of a 2D array.
| | 2 |
| Give the output for the following program.
#define STYLE1 char
main()
{
typedef char STYLE2;
STYLE1 x;
STYLE2 y;
clrscr();
x=255;
y=255;
printf("%d %d\n",x,y);
}
| ADITI | 1 |
| write a function to find whether a string is palindrome or
not and how many palindrome this string contain? | | 1 |
| 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 |
| how to find out the inorder successor of a node in a tree?? | TCS | 2 |
| Can you think of a way when a program crashed before
reaching main? If yes how? | | 2 |
| Write a program that accepts a string where multiple spaces
are given in between the words. Print the string ignoring
the multiple spaces.
Example:
Input: “ We.....Are....Student “ Note: one .=1 Space
Output: "We Are Student" | IBM | 3 |
| Unsigned char c;
for ( c=0;c!=256;c++2)
printf("%d",c);
No. of times the loop is executed ?
| Mascot | 3 |
| #include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
Tell me the output? | Ramco | 4 |
| please give me some tips for the selection in TCS. | TCS | 3 |
| |
| For more C Interview Questions Click Here |