ankuragrawal420
BAN USER
Comments (4)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
How will you implement a set in c?
- ankuragrawal420 November 14, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
There is no way you can delete the last node when only pointer to a node is given.Generally the question is asked for middle node and the answer still remains NO. But there you can simulate this behavior by copying the contents to next node and deleting the given node.
- ankuragrawal420 November 14, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
int max=0;
int i,j,index,no=0;
char *p[5]={{"abc"},{"def"},{"abcdefghi"},{"lop"},{"abcdeflopabcdefghi"}};
for(i=0;i<5;i++)
{
char * temp=p[i];
for (j=0;j<5;j++)
{
if (j!=i)
{
if((strstr(temp,p[j]))!=NULL)
{
no+=1;
}
}
}
if(no>max)
{
index=i;
max=no;
}
}
printf("%d Index element",index) ;
getchar();
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
You have not set head position afterwards.Also next pointer of your first node should be null
- ankuragrawal420 November 15, 2013