shruti


{ City } pune
< Country > india
* Profession * sap - technical consultant
User No # 13969
Total Questions Posted # 0
Total Answers Posted # 68

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

Users Marked my Answers as Correct # 1350
Users Marked my Answers as Wrong # 556
Answers / { shruti }

Question { TCS, 26672 }

write a program for even numbers?


Answer

to print numbers which are even from 0 to 100

main()
{
int i;

puts("THE EVEN NUMBERS ARE:");

for(i = 0 ; i <= 100 ; i++)
{
if(i%2 == 0)
printf("%d", i);
}

}

Is This Answer Correct ?    23 Yes 14 No

Question { Wipro, 15936 }

main()
{
clrscr();
}
clrscr();


Answer

Gud question.. have to try this out..

m not sure about the answer..

because clrscr() is an inbuilt function.
so the clrscr() in the main will jump to the function body
which is defined in the header files..

for the second clrscr()...
i donno...

have to check it out.. :-(

Is This Answer Correct ?    1 Yes 4 No


Question { ME, 17971 }

void main()
{
int i=5;
printf("%d",i+++++i);
}


Answer

i think it will give a compilation error..

Is This Answer Correct ?    1 Yes 2 No

Question { ME, 17336 }

#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}


Answer

nopes we cannot use 'j'... because single qutoes ' ' are
used only for character value.. i.e if it was
char i
switch(i)
then we cud have used it like that..


hence in our case,
it will give a compiler error...

Is This Answer Correct ?    3 Yes 3 No

Question { Aricent, 6951 }

What is the diffences between Windows XP and Windows Visa


Answer

XP - works on 32 bit processor

Vista or Longhorn - 64 bit (recommended) for good
performance

Vista has a better GUI (Graphic User Interface) compared to
XP.

searches are more indexed than in XP.


--thats all i can remember for this moment.. hope it helps..

Regards,

Shruti


Is This Answer Correct ?    4 Yes 1 No

Question { TCS, 5244 }

please give me some tips for the selection in TCS.


Answer

before getting into technical round you have to clear ur
apptitude round..

they have an online test..

they ask GRE ques..
prepare properly..

Is This Answer Correct ?    0 Yes 0 No

Question { Yahoo, 12552 }

how to find out the inorder successor of a node in a tree??


Answer

inorder trraversal is
left - vertex - right.

hence to find the successor of a node.

consider N node . we have to find the inorder successor of
N.
then,

if(n -> right != NULL)
n = n -> right. /* this is the successor of n.
else
{
n = pop();
(/* we have to pop the address of the node above n, which
we have pushed earlier while traversing leftwards*/)
/*n will be hte successor node.
}


in inorder traversal we have number in ascending order in a
binary search tree.
hence the successor always is to the right, if exists,
or one level above.

**Go through the inorder traversal program to get a better
picture.

Is This Answer Correct ?    11 Yes 27 No

Question { IBM, 127611 }

what is difference between array and structure?


Answer

Array is a base pointer..
** it points to a particular memory location..

Structure is not a pointer..

Is This Answer Correct ?    209 Yes 50 No

Question { Trigent, 23811 }

what is op?
for(c=0;c=1000;c++)
printf("%c",c);


Answer

It will give a compilation error..

the for loop syntax is
for(initialize; condition ; inc / dec)

condition -> assignment operator is wrong..

there should be 2 equals ("==")..

Is This Answer Correct ?    1 Yes 6 No

Question { HP, 28439 }

who is the founder of c


Answer

Dennis Ritchie founded C at AT&T Bell Labs..

@Nayanprakash..
the two people u mentioned are not involved in finding C..
but "B"
it was a language founded before C..

Is This Answer Correct ?    42 Yes 5 No

Question { TCS, 102131 }

How to reverse a String without using C functions ?


Answer

char * rev_string (char * str)
{
char temp;
int i , j;
for (i = 0 ; str[i]!= NULL ; i++);

for(j = 0 ; j < i ; j++ , i--)
{
temp = str[j];
str[j] = str[i];
str[i] = temp;
}

return str;
}

Is This Answer Correct ?    59 Yes 40 No

Question { TCS, 102131 }

How to reverse a String without using C functions ?


Answer

the above is slightly wrong
this is the corrected one..

char * rev_string (char * str)
{
char temp;
int i , j;
for (i = 0 ; str[i]!= '\0' ; i++);

for(j = 0 ; j < i ; j++ , i--)
{
temp = str[j];
str[j] = str[i];
str[i] = temp;
}

return str;
}

Is This Answer Correct ?    70 Yes 32 No

Question { Mphasis, 26188 }

Who is invented by c?


Answer

Are u asking "Who invented C??"

then the answer is

Dennis Ritchie invented C at the AT&T Bell labs..

Is This Answer Correct ?    23 Yes 5 No

Question { 8500 }

To what value do nonglobal variables default?




1) auto


2) register


3) static


Answer

Non global variables = local variables..

all non global variables default auto..

Is This Answer Correct ?    3 Yes 0 No

Question { 5457 }

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


Answer

Quicksort is a better option compared to the other twoo...

Is This Answer Correct ?    4 Yes 6 No

Prev    1   2   3    [4]   5    Next