dinakaran


{ City } vellore
< Country > india
* Profession * tamilnadu
User No # 18381
Total Questions Posted # 0
Total Answers Posted # 3

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 23
Users Marked my Answers as Wrong # 20
Questions / { dinakaran }
Questions Answers Category Views Company eMail




Answers / { dinakaran }

Question { ME, 13655 }

main()
{
int i=1;
while (i<=5)
{
printf("%d",i);
if (i>2)
goto here;
i++;
}
}
fun()
{
here:
printf("PP");
}


Answer

The program is error because of the "goto" statement can't
jump from one segment to another segment i.e not support for
long jump.

Is This Answer Correct ?    3 Yes 0 No

Question { Honeywell, 8267 }

can i know the source code for reversing a linked list with
out using a temporary variable?


Answer

#include
struct node *head;
void main();
{
//consider head is the first node
reverse(head);
//here print the reversed link list ...thank you;
}
reverse(struct node *cur)
{
if(cur->next==NULL)
reveres(cur->next)
else{temp=head=cur;}
temp->next=cur;
temp=temp->next;
temp->next=NULL;
}

Is This Answer Correct ?    2 Yes 1 No


Question { IBM, 22151 }

The code is::::: if(condition)
Printf("Hello");
Else
Printf("World");
What will be the condition in if in such a way that both
Hello and world are printed in a single attempt?????? Single
Attempt in the sense... It must first print "Hello" and it
Must go to else part and print "World"..... No loops,
Recursion are allowed........................


Answer

#include
void main()
{
if(1)
{
printf("HELLO!");
goto HERE;
}
else
{
HERE:
printf("HAI....");
}
}

Is This Answer Correct ?    18 Yes 19 No